From 7cf94abe78865b3b8bed84cf39da751712acc26e Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 16 Jul 2003 20:03:52 +0000 Subject: [PATCH] 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. --- src/makeBaseApp/Makefile | 12 ++++++------ src/makeBaseApp/top/exampleApp/src/Makefile | 15 ++++++++------- .../top/exampleApp/src/_APPNAME_Include.dbd | 3 ++- src/makeBaseApp/top/exampleApp/src/dbSubExample.c | 5 ++--- .../src/{_APPNAME_Support.dbd => xxxSupport.dbd} | 1 - 5 files changed, 18 insertions(+), 18 deletions(-) rename src/makeBaseApp/top/exampleApp/src/{_APPNAME_Support.dbd => xxxSupport.dbd} (80%) diff --git a/src/makeBaseApp/Makefile b/src/makeBaseApp/Makefile index fea1fa24f..b1713a013 100644 --- a/src/makeBaseApp/Makefile +++ b/src/makeBaseApp/Makefile @@ -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 diff --git a/src/makeBaseApp/top/exampleApp/src/Makefile b/src/makeBaseApp/top/exampleApp/src/Makefile index f09fa3e50..6a369bd61 100644 --- a/src/makeBaseApp/top/exampleApp/src/Makefile +++ b/src/makeBaseApp/top/exampleApp/src/Makefile @@ -13,12 +13,11 @@ LIBRARY_IOC += _APPNAME_Support # xxxRecord.h will be created from xxxRecord.dbd DBDINC += xxxRecord # install devXxxSoft.dbd into /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_ # .dbd will be created from Include.dbd DBD += _APPNAME_.dbd - # _registerRecordDeviceDriver.cpp will be created from .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 /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 diff --git a/src/makeBaseApp/top/exampleApp/src/_APPNAME_Include.dbd b/src/makeBaseApp/top/exampleApp/src/_APPNAME_Include.dbd index 8b8542265..e04befcbb 100644 --- a/src/makeBaseApp/top/exampleApp/src/_APPNAME_Include.dbd +++ b/src/makeBaseApp/top/exampleApp/src/_APPNAME_Include.dbd @@ -1,2 +1,3 @@ include "base.dbd" -include "_APPNAME_Support.dbd" +include "xxxSupport.dbd" +registrar(mySubRegistrar) diff --git a/src/makeBaseApp/top/exampleApp/src/dbSubExample.c b/src/makeBaseApp/top/exampleApp/src/dbSubExample.c index 5a54cb1d1..80b3a9d1e 100644 --- a/src/makeBaseApp/top/exampleApp/src/dbSubExample.c +++ b/src/makeBaseApp/top/exampleApp/src/dbSubExample.c @@ -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); diff --git a/src/makeBaseApp/top/exampleApp/src/_APPNAME_Support.dbd b/src/makeBaseApp/top/exampleApp/src/xxxSupport.dbd similarity index 80% rename from src/makeBaseApp/top/exampleApp/src/_APPNAME_Support.dbd rename to src/makeBaseApp/top/exampleApp/src/xxxSupport.dbd index ea5fafa85..8094bdda6 100644 --- a/src/makeBaseApp/top/exampleApp/src/_APPNAME_Support.dbd +++ b/src/makeBaseApp/top/exampleApp/src/xxxSupport.dbd @@ -1,3 +1,2 @@ include "xxxRecord.dbd" device(xxx,CONSTANT,devXxxSoft,"SoftChannel") -registrar(mySub)