Tidying up various things:

Made the support library contain only the xxxRecord and device support,
then renamed _APPNAME_Support.dbd to xxxSupport.dbd to reflect this.
Actually I should rename the library to libxxxSupport, but I didn't yet.

Now we link the dbSubExample.o code directly to the application,
renamed the registrar routine inside this to mySubRegistrar,
and also moved the registrar() dbd entry into _APPNAME_Include.dbd.
This commit is contained in:
Andrew Johnson
2003-07-16 20:03:52 +00:00
parent 025a73ca42
commit 7cf94abe78
5 changed files with 18 additions and 18 deletions

View File

@@ -33,14 +33,14 @@ TEMPLATES += top/exampleApp/Db/dbExample1.db
TEMPLATES += top/exampleApp/Db/dbExample2.db
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
TEMPLATES += top/exampleApp/src/_APPNAME_Main.cpp
TEMPLATES += top/exampleApp/src/xxxRecord.c
TEMPLATES += top/exampleApp/src/devXxxSoft.c
TEMPLATES += top/exampleApp/src/xxxSupport.dbd
TEMPLATES += top/exampleApp/src/sncExample.stt
TEMPLATES += top/exampleApp/src/dbSubExample.c
TEMPLATES += top/exampleApp/src/_APPNAME_Include.dbd
TEMPLATES += top/exampleApp/src/_APPNAME_Main.cpp
TEMPLATES += top/exampleBoot/Makefile
TEMPLATES += top/exampleBoot/nfsCommands@vxWorks

View File

@@ -13,12 +13,11 @@ LIBRARY_IOC += _APPNAME_Support
# xxxRecord.h will be created from xxxRecord.dbd
DBDINC += xxxRecord
# install devXxxSoft.dbd into <top>/dbd
DBD += _APPNAME_Support.dbd
DBD += xxxSupport.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)
@@ -29,29 +28,31 @@ 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
# Add locally compiled object code
_APPNAME__SRCS += dbSubExample.c
# The following adds support from base/src/vxWorks
_APPNAME__OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
_APPNAME__LIBS += _APPNAME_Support
#NOTES:
# 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_
# 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
# The following builds sncExample as a standalone application
#PROD_HOST += sncExample
#sncExample_SNCFLAGS += +m
#sncExample_SRCS += sncExample.stt

View File

@@ -1,2 +1,3 @@
include "base.dbd"
include "_APPNAME_Support.dbd"
include "xxxSupport.dbd"
registrar(mySubRegistrar)

View File

@@ -26,9 +26,8 @@ static registryFunctionRef mySubRef[] = {
{"mySubProcess",(REGISTRYFUNCTION)mySubProcess}
};
static void mySub(void)
static void mySubRegistrar(void)
{
registryFunctionRefAdd(mySubRef,NELEMENTS(mySubRef));
}
epicsExportRegistrar(mySub);
epicsExportRegistrar(mySubRegistrar);

View File

@@ -1,3 +1,2 @@
include "xxxRecord.dbd"
device(xxx,CONSTANT,devXxxSoft,"SoftChannel")
registrar(mySub)