make clear distinction between support and ioc apps

This commit is contained in:
Marty Kraimer
2003-04-04 15:01:42 +00:00
parent 34b8c943c5
commit 14b069660f
28 changed files with 229 additions and 109 deletions
+20 -14
View File
@@ -15,6 +15,18 @@ TEMPLATES += top/configure/RULES.iocBoot
TEMPLATES += top/configure/RULES_DIRS
TEMPLATES += top/configure/RULES_TOP
TEMPLATES += top/supportApp/Makefile
TEMPLATES += top/supportApp/Db/Makefile
TEMPLATES += top/supportApp/src/Makefile
TEMPLATES += top/supportApp/src/_APPNAME_.dbd
TEMPLATES += top/iocApp/Makefile
TEMPLATES += top/iocApp/Db/Makefile
TEMPLATES += top/iocApp/src/Makefile
TEMPLATES += top/iocApp/src/_APPNAME_Main.cpp
TEMPLATES += top/iocApp/src/_APPNAME_Include.dbd
TEMPLATES += top/iocApp/src/sncExample.stt
TEMPLATES += top/exampleApp/Makefile
TEMPLATES += top/exampleApp/Db/Makefile
TEMPLATES += top/exampleApp/Db/dbExample1.db
@@ -23,6 +35,7 @@ TEMPLATES += top/exampleApp/Db/dbSubExample.db
TEMPLATES += top/exampleApp/src/Makefile
TEMPLATES += top/exampleApp/src/devXxxSoft.c
TEMPLATES += top/exampleApp/src/xxxRecord.c
TEMPLATES += top/exampleApp/src/_APPNAME_Support.dbd
TEMPLATES += top/exampleApp/src/_APPNAME_Include.dbd
TEMPLATES += top/exampleApp/src/sncExample.stt
TEMPLATES += top/exampleApp/src/xxxRecord.dbd
@@ -56,20 +69,13 @@ TEMPLATES += top/caServerApp/main.cc
TEMPLATES += top/caServerApp/test.adl
TEMPLATES += top/caServerApp/vxEntry.cc
TEMPLATES += top/simpleApp/Makefile
TEMPLATES += top/simpleApp/Db/Makefile
TEMPLATES += top/simpleApp/src/Makefile
TEMPLATES += top/simpleApp/src/Makefile
TEMPLATES += top/simpleApp/src/_APPNAME_Include.dbd
TEMPLATES += top/simpleApp/src/_APPNAME_Main.cpp
TEMPLATES += top/simpleBoot/Makefile
TEMPLATES += top/simpleBoot/nfsCommands@vxWorks
TEMPLATES += top/simpleBoot/ioc/Makefile@Common
TEMPLATES += top/simpleBoot/ioc/Makefile@vxWorks
TEMPLATES += top/simpleBoot/ioc/st.cmd@Common
TEMPLATES += top/simpleBoot/ioc/st.cmd@vxWorks
TEMPLATES += top/simpleBoot/ioc/st.cmd@RTEMS
TEMPLATES += top/iocBoot/Makefile
TEMPLATES += top/iocBoot/nfsCommands@vxWorks
TEMPLATES += top/iocBoot/ioc/Makefile@Common
TEMPLATES += top/iocBoot/ioc/Makefile@vxWorks
TEMPLATES += top/iocBoot/ioc/st.cmd@Common
TEMPLATES += top/iocBoot/ioc/st.cmd@vxWorks
TEMPLATES += top/iocBoot/ioc/st.cmd@RTEMS
SCRIPTS_HOST += makeBaseApp.pl
+19 -14
View File
@@ -5,25 +5,30 @@ include $(TOP)/configure/CONFIG
# ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================
#==================================================
# build a support library
LIBRARY_IOC += _APPNAME_Support
# xxxRecord.h will be created from xxxRecord.dbd
DBDINC += xxxRecord
# install devXxxSoft.dbd into <top>/dbd
DBD += _APPNAME_Support.dbd
# The following are compiled and added to the Support library
_APPNAME_Support_SRCS += xxxRecord.c
_APPNAME_Support_SRCS += devXxxSoft.c
_APPNAME_Support_SRCS += dbSubExample.c
_APPNAME_Support_LIBS += $(EPICS_BASE_IOC_LIBS)
#=============================
# build an ioc application
PROD_IOC = _APPNAME_
# <name>.dbd will be created from <name>Include.dbd
DBD += _APPNAME_.dbd
#=============================
LIBRARY_IOC += _APPNAME_Ioc
_APPNAME_Ioc_SRCS += xxxRecord.c
_APPNAME_Ioc_SRCS += devXxxSoft.c
_APPNAME_Ioc_SRCS += dbSubExample.c
_APPNAME_Ioc_LIBS += $(EPICS_BASE_IOC_LIBS)
#=============================
PROD_IOC = _APPNAME_
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
_APPNAME__SRCS += _APPNAME__registerRecordDeviceDriver.cpp
@@ -33,7 +38,7 @@ _APPNAME__SRCS_vxWorks += -nil-
#The following adds support from base/src/vxWorks
_APPNAME__OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
_APPNAME__LIBS += _APPNAME_Ioc
_APPNAME__LIBS += _APPNAME_Support
#NOTES:
# 1)It is not possible to build sncExample both as a component of _APPNAME_
@@ -1,4 +1,2 @@
include "base.dbd"
include "xxxRecord.dbd"
device(xxx,CONSTANT,devXxxSoft,"SoftChannel")
registrar("mySub")
include "_APPNAME_Support.dbd"
@@ -0,0 +1,3 @@
include "xxxRecord.dbd"
device(xxx,CONSTANT,devXxxSoft,"SoftChannel")
registrar(mySub)
@@ -1,4 +1,4 @@
TOP = ../..
include $(TOP)/configure/CONFIG
ARCH = _ARCH_
#nothing to do
include $(TOP)/configure/RULES.ioc
@@ -1,8 +1,8 @@
#!../../bin/_ARCH_/_APPNAME_
## The names of the binary above and .dbd file below will be incorrect
## unless you used the same names for the ioc and the app directory.
# create and register all record/device/driver/registrar support
dbLoadDatabase("../../dbd/_APPNAME_.dbd",0,0)
registerRecordDeviceDriver(pdbbase)
dbLoadRecords("../../db/dbExample1.db","user=_USER_Host")
@@ -1,3 +1,7 @@
# Simple startup script
# You may have to change _APPNAME_ to something else
# everywhere it appears in this file
dbLoadDatabase("dbd/_APPNAME_.dbd",0,0)
registerRecordDeviceDriver(pdbbase)
dbLoadRecords("db/dbExample1.db","user=_USER_")
@@ -8,6 +8,9 @@
#< ../nfsCommands
cd topbin
# You may have to change _APPNAME_ to something else
# everywhere it appears in this file
ld < _APPNAME_.munch
#The following uses drvTS for vxWorks. May be needed for hardware event systems
@@ -1,17 +1,16 @@
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#----------------------------------------------------
# Optimization of DB files using dbst (DEFAULT: NO)
# Optimization of db files using dbst (DEFAULT: NO)
#DB_OPT = YES
#----------------------------------------------------
# Create and install (or just install)
# Create and install (or just install) into <top>/db
# databases, templates, substitutions like this
#DB += _APPNAME_.db
#DB += xxx.db
#----------------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add
+8
View File
@@ -0,0 +1,8 @@
TOP = ..
include $(TOP)/configure/CONFIG
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *src*))
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Src*))
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *db*))
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Db*))
include $(TOP)/configure/RULES_DIRS
+50
View File
@@ -0,0 +1,50 @@
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================
#=============================
# build an ioc application
PROD_IOC = _APPNAME_
# <name>.dbd will be created from <name>Include.dbd
DBD += _APPNAME_.dbd
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
_APPNAME__SRCS += _APPNAME__registerRecordDeviceDriver.cpp
_APPNAME__SRCS_DEFAULT += _APPNAME_Main.cpp
_APPNAME__SRCS_vxWorks += -nil-
#The following adds support from base/src/vxWorks
_APPNAME__OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
#add a definition for each support application used by this application
#_APPNAME__LIBS += xxx
#NOTES:
# 1)It is not possible to build sncExample both as a component of _APPNAME_
# and standalone. You must choose only one.
# 2)To build sncExample SNCSEQ must be defined in <top>/configure/RELEASE
#The following builds sncExample as a component of _APPNAME_
#_APPNAME__SRCS += sncExample.stt
#_APPNAME__LIBS += seq pv
_APPNAME__LIBS += $(EPICS_BASE_IOC_LIBS)
#The following builds sncExample as a standalone application
#PROD_HOST += sncExample
#sncExample_SNCFLAGS += +m
#sncExample_SRCS += sncExample.stt
#sncExample_LIBS += seq pv
#sncExample_LIBS += $(EPICS_BASE_HOST_LIBS)
#===========================
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE
@@ -0,0 +1,3 @@
include "base.dbd"
#include definitions for any other support applications needed
#include "xxx.dbd"
@@ -0,0 +1,28 @@
program sncExample
float v;
assign v to "{user}:xxxExample";
monitor v;
ss ss1
{
state low
{
when(v>5.0)
{
printf("changing to high\n");
} state high
when(delay(.1))
{
} state low
}
state high
{
when(v<=5.0)
{
printf("changing to low\n");
} state low
when(delay(.1))
{
} state high
}
}
@@ -1,4 +1,4 @@
TOP = ../..
include $(TOP)/configure/CONFIG
ARCH = _ARCH_
# nothing to do
include $(TOP)/configure/RULES.ioc
@@ -1,8 +1,5 @@
TOP = ../..
include $(TOP)/configure/CONFIG
ARCH = _ARCH_
# vxWorks architecture needs a cdCommands file
buildInstall: cdCommands
TARGETS = cdCommands
include $(TOP)/configure/RULES.ioc
@@ -0,0 +1,14 @@
#!../../bin/_ARCH_/_APPNAME_
## The names of the binary above and .dbd file below will be incorrect
## unless you used the same names for the ioc and the app directory.
# create and register all record/device/driver/registrar support
dbLoadDatabase("../../dbd/_APPNAME_.dbd",0,0)
registerRecordDeviceDriver(pdbbase)
## Load record definitions as necessary like this:
#dbLoadRecords("../../db/xxx.db","user=_USER_Host")
iocInit()
## To start a local sequence program:
#seq sncxxx,"user=_USER_Host"
@@ -1,6 +1,12 @@
# Simple startup script
# You may have to change _APPNAME_ to something else
# everywhere it appears in this file
# create and register all record/device/driver/registrar support
dbLoadDatabase("../../dbd/_APPNAME_.dbd",0,0)
registerRecordDeviceDriver(pdbbase)
dbLoadRecords("../../db/_APPNAME_.db","user=_USER_")
iocInit()
#seq snc_APPNAME_,"user=_USER_"
@@ -7,10 +7,17 @@
#< ../nfsCommands
cd topbin
# You may have to change _APPNAME_ to something else
# everywhere it appears in this file
#ld < _APPNAME_Lib
cd startup
#dbLoadDatabase("../../dbd/_APPNAME_.dbd")
# create all record/device/driver/registrar support
dbLoadDatabase("../../dbd/_APPNAME_.dbd")
registerRecordDeviceDriver(pdbbase)
#load record instances
#dbLoadRecords("../../db/_APPNAME_.db")
#dbLoadTemplate("../../db/_APPNAME_.substitutions")
@@ -1,52 +0,0 @@
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================
#_APPNAME_.dbd will be created from _APPNAME_Include.dbd
DBD += _APPNAME_.dbd
#=============================
#The following creates a library
#LIBRARY_IOC += _APPNAME_Ioc
#_APPNAME_Ioc_LIBS += $(EPICS_BASE_IOC_LIBS)
#_APPNAME_Ioc_SRCS += xxx.c xxx.cpp xxx.stt
#=============================
#The following creates an application
PROD_IOC = _APPNAME_
#_APPNAME__SRCS += yyy.c yyy.cpp yyy.stt
#_APPNAME__registerRecordDeviceDriver.cpp will be created from _APPNAME_.dbd
_APPNAME__SRCS += _APPNAME__registerRecordDeviceDriver.cpp
## If _APPNAME_ is to be built for both vxWorks and for the host then
_APPNAME__SRCS_DEFAULT += _APPNAME_Main.cpp
_APPNAME__SRCS_vxWorks += -nil-
## For sequence programs, use
#_APPNAME__SRCS += sncExample.stt
#_APPNAME__LIBS += seq pv
## The following adds support from base/src/vxWorks
_APPNAME__OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
## The following adds libraries built here
#_APPNAME__LIBS += _APPNAME_Ioc
## The following adds other module libraries
#_APPNAME__LIBS += xxx
## The following adds EPICS base libraries
_APPNAME__LIBS += $(EPICS_BASE_IOC_LIBS)
#=============================
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE
@@ -1 +0,0 @@
include "base.dbd"
@@ -1,13 +0,0 @@
## Simple startup script
## You may need to edit the name of this .dbd file:
dbLoadDatabase("../../dbd/_APPNAME_.dbd",0,0)
registerRecordDeviceDriver(pdbbase)
## Load record definitions as necessary like this:
#dbLoadRecords("../../db/_APPNAME_.db","user=_USER_Host")
iocInit()
## To start a local sequence program:
#seq snc_APPNAME_,"user=_USER_Host"
@@ -0,0 +1,22 @@
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#----------------------------------------------------
# Optimization of db files using dbst (DEFAULT: NO)
#DB_OPT = YES
#----------------------------------------------------
# Create and install (or just install) into <top>/db
# databases, templates, substitutions like this
#DB += xxx.db
#----------------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add
# <anyname>_template = <templatename>
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE
@@ -0,0 +1,28 @@
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================
#==================================================
# build a support library
LIBRARY_IOC += _APPNAME_
# xxxRecord.h will be created from xxxRecord.dbd
#DBDINC += xxxRecord
# install _APPNAME_.dbd into <top>/dbd
DBD += _APPNAME_.dbd
# specify all source files to be compiled and added to the library
#_APPNAME__SRCS += xxx
_APPNAME__LIBS += $(EPICS_BASE_IOC_LIBS)
#===========================
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE
@@ -0,0 +1,5 @@
# provide definitions such as
#include "xxxRecord.dbd"
#device(xxx,CONSTANT,devXxxSoft,"SoftChannel")
#driver(myDriver)
#registrar(mySub)