diff --git a/src/makeBaseApp/Makefile b/src/makeBaseApp/Makefile index 3c59ed49e..edded6207 100644 --- a/src/makeBaseApp/Makefile +++ b/src/makeBaseApp/Makefile @@ -7,30 +7,21 @@ TEMPLATES_DIR = makeBaseApp TEMPLATES += top/Makefile TEMPLATES += top/configure/CONFIG TEMPLATES += top/configure/CONFIG_APP +TEMPLATES += top/configure/Makefile TEMPLATES += top/configure/RELEASE +TEMPLATES += top/configure/RULES TEMPLATES += top/configure/RULES.Db -TEMPLATES += top/configure/RULES_ARCHS -TEMPLATES += top/configure/RULES_BUILD -TEMPLATES += top/configure/RULES_DIRS -TEMPLATES += top/configure/RULES_TOP TEMPLATES += top/configure/RULES.ioc TEMPLATES += top/configure/RULES.iocBoot TEMPLATES += top/configure/RULES.registerRecordDeviceDriver - -TEMPLATES += top/configure/Makefile -TEMPLATES += top/configure/makeConfigAppInclude.pl -TEMPLATES += top/configure/makeDbDepends.pl -TEMPLATES += top/configure/makeIocCdCommands.pl -TEMPLATES += top/configure/replaceVAR.pl +TEMPLATES += top/configure/RULES_DIRS +TEMPLATES += top/configure/RULES_TOP TEMPLATES += top/exampleApp/Makefile TEMPLATES += top/exampleApp/Db/Makefile -TEMPLATES += top/exampleApp/Db/Makefile.Host TEMPLATES += top/exampleApp/Db/dbExample1.db TEMPLATES += top/exampleApp/Db/dbExample2.db TEMPLATES += top/exampleApp/src/Makefile -TEMPLATES += top/exampleApp/src/Makefile.Host -TEMPLATES += top/exampleApp/src/Makefile.Ioc TEMPLATES += top/exampleApp/src/base.dbd TEMPLATES += top/exampleApp/src/baseLIBOBJS TEMPLATES += top/exampleApp/src/caExample.c @@ -48,8 +39,6 @@ TEMPLATES += top/exampleBoot/ioc/st.cmd TEMPLATES += top/simpleApp/Makefile TEMPLATES += top/simpleApp/Db/Makefile TEMPLATES += top/simpleApp/src/Makefile -TEMPLATES += top/simpleApp/src/Makefile.Host -TEMPLATES += top/simpleApp/src/Makefile.Ioc TEMPLATES += top/simpleBoot/Makefile TEMPLATES += top/simpleBoot/nfsCommands diff --git a/src/makeBaseApp/top/configure/CONFIG b/src/makeBaseApp/top/configure/CONFIG index 5c6b5a065..0e5821c05 100644 --- a/src/makeBaseApp/top/configure/CONFIG +++ b/src/makeBaseApp/top/configure/CONFIG @@ -1,4 +1,5 @@ #CONFIG include $(TOP)/configure/CONFIG_APP # Add any changes to make rules here -#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 + +CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 diff --git a/src/makeBaseApp/top/configure/Makefile b/src/makeBaseApp/top/configure/Makefile index 053d91158..87deb69df 100644 --- a/src/makeBaseApp/top/configure/Makefile +++ b/src/makeBaseApp/top/configure/Makefile @@ -6,4 +6,15 @@ TOP=.. include $(TOP)/configure/CONFIG -include $(TOP)/configure/RULES_ARCHS +TARGETS = CONFIG_APP_INCLUDE + +include $(TOP)/configure/RULES + +ifeq ($(wildcard $(TOP)/configure/RELEASE.$(HOST_ARCH)),$(TOP)/configure/RELEASE.$(HOST_ARCH)) +CONFIG_APP_INCLUDE: $(TOP)/configure/RELEASE.$(HOST_ARCH) +endif + +CONFIG_APP_INCLUDE: $(TOP)/configure/RELEASE $(TOP)/configure/CONFIG_APP + $(RM) $@ + @$(PERL) $(TOOLS)/makeConfigAppInclude.pl $(T_A) $@ $(TOP) + diff --git a/src/makeBaseApp/top/configure/Makefile.Host b/src/makeBaseApp/top/configure/Makefile.Host deleted file mode 100644 index 65fd1d270..000000000 --- a/src/makeBaseApp/top/configure/Makefile.Host +++ /dev/null @@ -1,19 +0,0 @@ -# -# $Id$ -# - -TOP=.. -include $(TOP)/configure/CONFIG - -TARGETS = CONFIG_APP_INCLUDE - -include $(TOP)/configure/RULES_BUILD - -ifeq ($(wildcard $(TOP)/configure/RELEASE.$(HOST_ARCH)),$(TOP)/configure/RELEASE.$(HOST_ARCH)) -CONFIG_APP_INCLUDE: $(TOP)/configure/RELEASE.$(HOST_ARCH) -endif - -CONFIG_APP_INCLUDE: $(TOP)/configure/RELEASE $(TOP)/configure/CONFIG_APP - $(RM) $@ - @$(PERL) $(TOP)/configure/makeConfigAppInclude.pl $(T_A) $@ $(TOP) - diff --git a/src/makeBaseApp/top/configure/Makefile.Ioc b/src/makeBaseApp/top/configure/Makefile.Ioc deleted file mode 100644 index 65fd1d270..000000000 --- a/src/makeBaseApp/top/configure/Makefile.Ioc +++ /dev/null @@ -1,19 +0,0 @@ -# -# $Id$ -# - -TOP=.. -include $(TOP)/configure/CONFIG - -TARGETS = CONFIG_APP_INCLUDE - -include $(TOP)/configure/RULES_BUILD - -ifeq ($(wildcard $(TOP)/configure/RELEASE.$(HOST_ARCH)),$(TOP)/configure/RELEASE.$(HOST_ARCH)) -CONFIG_APP_INCLUDE: $(TOP)/configure/RELEASE.$(HOST_ARCH) -endif - -CONFIG_APP_INCLUDE: $(TOP)/configure/RELEASE $(TOP)/configure/CONFIG_APP - $(RM) $@ - @$(PERL) $(TOP)/configure/makeConfigAppInclude.pl $(T_A) $@ $(TOP) - diff --git a/src/makeBaseApp/top/configure/RULES b/src/makeBaseApp/top/configure/RULES new file mode 100644 index 000000000..44f554e7e --- /dev/null +++ b/src/makeBaseApp/top/configure/RULES @@ -0,0 +1,2 @@ +#CONFIG +include $(EPICS_BASE)/configure/RULES diff --git a/src/makeBaseApp/top/configure/RULES_ARCHS b/src/makeBaseApp/top/configure/RULES_ARCHS deleted file mode 100644 index 2ee5484b9..000000000 --- a/src/makeBaseApp/top/configure/RULES_ARCHS +++ /dev/null @@ -1,2 +0,0 @@ -#RULES_ARCHS -include $(EPICS_BASE)/configure/RULES_ARCHS diff --git a/src/makeBaseApp/top/configure/RULES_BUILD b/src/makeBaseApp/top/configure/RULES_BUILD deleted file mode 100644 index 3a87d0322..000000000 --- a/src/makeBaseApp/top/configure/RULES_BUILD +++ /dev/null @@ -1,3 +0,0 @@ -#RULES_BUILD -include $(EPICS_BASE)/configure/RULES_BUILD -include $(TOP)/configure/RULES.registerRecordDeviceDriver diff --git a/src/makeBaseApp/top/configure/makeConfigAppInclude.pl b/src/makeBaseApp/top/configure/makeConfigAppInclude.pl deleted file mode 100644 index eb94b7c97..000000000 --- a/src/makeBaseApp/top/configure/makeConfigAppInclude.pl +++ /dev/null @@ -1,63 +0,0 @@ -# $Id$ - -eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- - if $running_under_some_shell; # makeConfigAppInclude.pl - -use Cwd; - -$arch = $ARGV[0]; -$outfile = $ARGV[1]; -$top = $ARGV[2]; - -unlink("${outfile}"); -open(OUT,">${outfile}") or die "$! opening ${outfile}"; -print OUT "#Do not modify this file.\n"; -print OUT "#This file is created during the build.\n"; - -@files =(); -push(@files,"$top/configure/RELEASE"); -push(@files,"$top/configure/RELEASE.${arch}"); -foreach $file (@files) { - if (-r "$file") { - open(IN, "$file") or die "Cannot open $file\n"; - while ($line = ) { - next if ( $line =~ /\s*#/ ); - chomp($line); - $_ = $line; - #the following looks for - # prefix = $(macro)post - ($prefix,$macro,$post) = /(.*)\s*=\s*\$\((.*)\)(.*)/; - if ($macro eq "") { # true if no macro is present - # the following looks for - # prefix = post - ($prefix,$post) = /(.*)\s*=\s*(.*)/; - } else { - $base = $applications{$macro}; - if ($base eq "") { - #print "error: $macro was not previously defined\n"; - } else { - $post = $base . $post; - } - } - $applications{$prefix} = $post; - if ( -d "$post") { #check that directory exists - print OUT "\n"; - if ( -d "$post/bin/$arch") { #check that directory exists - print OUT "${prefix}_BIN = $post/bin/${arch}\n"; - } - if ( -d "$post/lib/$arch") { #check that directory exists - print OUT "${prefix}_LIB = $post/lib/${arch}\n"; - } - if ( -d "$post/include") { #check that directory exists - print OUT "INSTALL_INCLUDES += -I$post/include\n"; - } - if ( -d "$post/dbd") { #check that directory exists - print OUT "INSTALL_DBDFLAGS += -I $post/dbd\n"; - } - } - } - close IN; - } -} -close OUT; - diff --git a/src/makeBaseApp/top/configure/makeDbDepends.pl b/src/makeBaseApp/top/configure/makeDbDepends.pl deleted file mode 100644 index bb8042bb8..000000000 --- a/src/makeBaseApp/top/configure/makeDbDepends.pl +++ /dev/null @@ -1,23 +0,0 @@ -eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- - if $running_under_some_shell; # makeDbDepends.pl - -# Called from within the object directory. -# Searches the .substitutions files (from the command line) for -# "file xxx {" entries to create a DEPENDS file - -open(OUT, ">DEPENDS") or die "Cannot open DEPENDS: $!"; - -foreach $file (@ARGV) { - open(IN, "<$file") or die "Cannot open $file: $!"; - @substfile = ; - close IN or die "Cannot close $file: $!"; - - @depends = grep { s/^\s*file\s*(.*)\s*\{.*$/\1/ } @substfile; - chomp @depends; - - if (@depends) { - $file =~ s/\.substitutions/\.t.db.raw/; - print OUT "${file}:: @depends\n"; - } -} -close OUT or die "Cannot close $file: $!"; diff --git a/src/makeBaseApp/top/configure/makeIocCdCommands.pl b/src/makeBaseApp/top/configure/makeIocCdCommands.pl deleted file mode 100644 index 090aadec9..000000000 --- a/src/makeBaseApp/top/configure/makeIocCdCommands.pl +++ /dev/null @@ -1,60 +0,0 @@ -eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- - if $running_under_some_shell; # makeIocCdCommands.pl - -use Cwd; - -$cwd = cwd(); -#hack for sun4 -$cwd =~ s|/tmp_mnt||; -$arch = $ARGV[0]; - -unlink("cdCommands"); -open(OUT,">cdCommands") or die "$! opening cdCommands"; -print OUT "startup = \"$cwd\"\n"; - -#appbin is kept for compatibility with 3.13.1 -$appbin = $cwd; -$appbin =~ s/iocBoot.*//; -$appbin = $appbin . "/bin/${arch}"; -print OUT "appbin = \"$appbin\"\n"; - -$top = $cwd; -$top =~ s/\/iocBoot.*//; -print OUT "top = \"$top\"\n"; -$topbin = "${top}/bin/${arch}"; -#skip check that top/bin/${arch} exists; src may not have been builT -print OUT "topbin = \"$topbin\"\n"; -$release = "$top/configure/RELEASE"; -if (-r "$release") { - open(IN, "$release") or die "Cannot open $release\n"; - while ($line = ) { - next if ( $line =~ /\s*#/ ); - chomp($line); - $_ = $line; - #the following looks for - # prefix = $(macro)post - ($prefix,$macro,$post) = /(.*)\s*=\s*\$\((.*)\)(.*)/; - if ($macro eq "") { # true if no macro is present - # the following looks for - # prefix = post - ($prefix,$post) = /(.*)\s*=\s*(.*)/; - } else { - $base = $applications{$macro}; - if ($base eq "") { - print "error: $macro was not previously defined\n"; - } else { - $post = $base . $post; - } - } - $applications{$prefix} = $post; - $app = lc($prefix); - if ( -d "$post") { #check that directory exists - print OUT "$app = \"$post\"\n"; - } - if ( -d "$post/bin/$arch") { #check that directory exists - print OUT "${app}bin = \"$post/bin/$arch\"\n"; - } - } - close IN; -} -close OUT; diff --git a/src/makeBaseApp/top/configure/replaceVAR.pl b/src/makeBaseApp/top/configure/replaceVAR.pl deleted file mode 100644 index e87474007..000000000 --- a/src/makeBaseApp/top/configure/replaceVAR.pl +++ /dev/null @@ -1,12 +0,0 @@ -eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- - if $running_under_some_shell; # replaceVAR.pl - -# Called from within the object directory -# Replaces VAR(xxx) with $(xxx) -# and VAR_xxx_ with $(xxx) - -while () { - s/VAR\(/\$\(/g; - s/VAR_([^_]*)_/\$\($1\)/g; - print; -} diff --git a/src/makeBaseApp/top/exampleApp/Db/Makefile b/src/makeBaseApp/top/exampleApp/Db/Makefile index 77a421bae..5bcb6dd83 100644 --- a/src/makeBaseApp/top/exampleApp/Db/Makefile +++ b/src/makeBaseApp/top/exampleApp/Db/Makefile @@ -1,3 +1,29 @@ TOP=../.. -include $(TOP)/configure/CONFIG_APP -include $(TOP)/configure/RULES_ARCHS +include $(TOP)/configure/CONFIG +#---------------------------------------- +# ADD MACRO DEFINITIONS AFTER THIS LINE + +#---------------------------------------------------- +# Optimization of db files using dbst (DEFAULT: NO) +#DB_OPT = YES + +#---------------------------------------------------- +# Optimization needs the name of the appropriate +# dbd file (compare with ../src/Makefile.Vx) +#DBDNAME = exampleApp.dbd + +#---------------------------------------------------- +# Add databases, templates, substitutions like this +DB += dbExample1.db dbExample2.db + +#---------------------------------------------------- +# Declare template files which do not show up in DB +#USES_TEMPLATE += dbExample2.template + +#---------------------------------------------------- +# The following line is for local dbd expansion +#DBDEXPAND = exampleInclude.dbd + +include $(TOP)/configure/RULES.Db +#---------------------------------------- +# ADD RULES AFTER THIS LINE diff --git a/src/makeBaseApp/top/exampleApp/Db/Makefile.Host b/src/makeBaseApp/top/exampleApp/Db/Makefile.Host deleted file mode 100644 index 5bcb6dd83..000000000 --- a/src/makeBaseApp/top/exampleApp/Db/Makefile.Host +++ /dev/null @@ -1,29 +0,0 @@ -TOP=../.. -include $(TOP)/configure/CONFIG -#---------------------------------------- -# ADD MACRO DEFINITIONS AFTER THIS LINE - -#---------------------------------------------------- -# Optimization of db files using dbst (DEFAULT: NO) -#DB_OPT = YES - -#---------------------------------------------------- -# Optimization needs the name of the appropriate -# dbd file (compare with ../src/Makefile.Vx) -#DBDNAME = exampleApp.dbd - -#---------------------------------------------------- -# Add databases, templates, substitutions like this -DB += dbExample1.db dbExample2.db - -#---------------------------------------------------- -# Declare template files which do not show up in DB -#USES_TEMPLATE += dbExample2.template - -#---------------------------------------------------- -# The following line is for local dbd expansion -#DBDEXPAND = exampleInclude.dbd - -include $(TOP)/configure/RULES.Db -#---------------------------------------- -# ADD RULES AFTER THIS LINE diff --git a/src/makeBaseApp/top/exampleApp/src/Makefile b/src/makeBaseApp/top/exampleApp/src/Makefile index 256417b88..b76a40e4d 100644 --- a/src/makeBaseApp/top/exampleApp/src/Makefile +++ b/src/makeBaseApp/top/exampleApp/src/Makefile @@ -1,6 +1,43 @@ TOP=../.. include $(TOP)/configure/CONFIG +#---------------------------------------- +# ADD MACRO DEFINITIONS AFTER THIS LINE -include $(TOP)/configure/RULES_ARCHS +#USR_CFLAGS += +PROD_LIBS += ca +PROD_LIBS += Db +PROD_LIBS += Com +ca_DIR = $(EPICS_BASE_LIB) +Db_DIR = $(EPICS_BASE_LIB) +Com_DIR = $(EPICS_BASE_LIB) +PROD += caExample + +#USR_CFLAGS += + +RECTYPES += xxxRecord.h +DBDEXPAND = exampleInclude.dbd +DBDNAME = exampleApp.dbd + +LIBRARY_IOC = exampleLib + +exampleLib_SRCS += xxxRecord.c +exampleLib_SRCS += devXxxSoft.c +exampleLib_SRCS += sncExample.c + +#exampleLib_SRCS += registerRecordDeviceDriver.c + +LIBOBJS += $(EPICS_BASE_BIN)/registerRecordDeviceDriver.o + +LIBOBJS += $(EPICS_BASE_BIN)/iocCore +LIBOBJS += $(EPICS_BASE_BIN)/seq + +-include ../baseLIBOBJS + +#Note that the command line that builds the +#library $(LIBRARY_IOC) may be HUGE (>3kB) +# +include $(TOP)/configure/RULES +#---------------------------------------- +# ADD RULES AFTER THIS LINE diff --git a/src/makeBaseApp/top/exampleApp/src/Makefile.Host b/src/makeBaseApp/top/exampleApp/src/Makefile.Host deleted file mode 100644 index 94a8e36d8..000000000 --- a/src/makeBaseApp/top/exampleApp/src/Makefile.Host +++ /dev/null @@ -1,18 +0,0 @@ -TOP=../.. -include $(TOP)/configure/CONFIG -#---------------------------------------- -# ADD MACRO DEFINITIONS AFTER THIS LINE - -#USR_CFLAGS += -PROD_LIBS += ca -PROD_LIBS += Db -PROD_LIBS += Com -ca_DIR = $(EPICS_BASE_LIB) -Db_DIR = $(EPICS_BASE_LIB) -Com_DIR = $(EPICS_BASE_LIB) - -PROD += caExample - -include $(TOP)/configure/RULES_BUILD -#---------------------------------------- -# ADD RULES AFTER THIS LINE diff --git a/src/makeBaseApp/top/exampleApp/src/Makefile.Ioc b/src/makeBaseApp/top/exampleApp/src/Makefile.Ioc deleted file mode 100644 index db9be8503..000000000 --- a/src/makeBaseApp/top/exampleApp/src/Makefile.Ioc +++ /dev/null @@ -1,32 +0,0 @@ -TOP=../.. -include $(TOP)/configure/CONFIG -#---------------------------------------- -# ADD MACRO DEFINITIONS AFTER THIS LINE - -#USR_CFLAGS += - -RECTYPES += xxxRecord.h -DBDEXPAND = exampleInclude.dbd -DBDNAME = exampleApp.dbd - -LIBRARY_vxWorks = exampleLib - -exampleLib_SRCS += xxxRecord.c -exampleLib_SRCS += devXxxSoft.c -exampleLib_SRCS += sncExample.c - -#exampleLib_SRCS += registerRecordDeviceDriver.c - -LIBOBJS += $(EPICS_BASE_BIN)/registerRecordDeviceDriver.o - -LIBOBJS += $(EPICS_BASE_BIN)/iocCore -LIBOBJS += $(EPICS_BASE_BIN)/seq - -include ../baseLIBOBJS - -#Note that the command line that builds the -#library $(LIBNAME) may be HUGE (>3kB) -# -include $(TOP)/configure/RULES_BUILD -#---------------------------------------- -# ADD RULES AFTER THIS LINE diff --git a/src/makeBaseApp/top/simpleApp/src/Makefile b/src/makeBaseApp/top/simpleApp/src/Makefile index f39a8c973..f2df64cb1 100644 --- a/src/makeBaseApp/top/simpleApp/src/Makefile +++ b/src/makeBaseApp/top/simpleApp/src/Makefile @@ -1,5 +1,20 @@ TOP=../.. include $(TOP)/configure/CONFIG +#---------------------------------------- +# ADD MACRO DEFINITIONS AFTER THIS LINE + +#USR_CFLAGS += +PROD_LIBS += ca +PROD_LIBS += Db +PROD_LIBS += Com +ca_DIR = $(EPICS_BASE_LIB) +Db_DIR = $(EPICS_BASE_LIB) +Com_DIR = $(EPICS_BASE_LIB) + +#PROD = + +include $(TOP)/configure/RULES_BUILD +#---------------------------------------- +# ADD RULES AFTER THIS LINE -include $(TOP)/configure/RULES_ARCHS diff --git a/src/makeBaseApp/top/simpleApp/src/Makefile.Host b/src/makeBaseApp/top/simpleApp/src/Makefile.Host deleted file mode 100644 index b565e35ee..000000000 --- a/src/makeBaseApp/top/simpleApp/src/Makefile.Host +++ /dev/null @@ -1,19 +0,0 @@ -TOP=../.. -include $(TOP)/configure/CONFIG -#---------------------------------------- -# ADD MACRO DEFINITIONS AFTER THIS LINE - -#USR_CFLAGS += -PROD_LIBS += ca -PROD_LIBS += Db -PROD_LIBS += Com -ca_DIR = $(EPICS_BASE_LIB) -Db_DIR = $(EPICS_BASE_LIB) -Com_DIR = $(EPICS_BASE_LIB) - -#PROD = - -include $(TOP)/configure/RULES_BUILD -#---------------------------------------- -# ADD RULES AFTER THIS LINE - diff --git a/src/makeBaseApp/top/simpleApp/src/Makefile.Ioc b/src/makeBaseApp/top/simpleApp/src/Makefile.Ioc deleted file mode 100644 index c027a636b..000000000 --- a/src/makeBaseApp/top/simpleApp/src/Makefile.Ioc +++ /dev/null @@ -1,12 +0,0 @@ -TOP=../.. -include $(TOP)/configure/CONFIG -#---------------------------------------- -# ADD MACRO DEFINITIONS AFTER THIS LINE - -#Note that the command line that builds the -#library $(LIBNAME) may be HUGE (>3kB) -# -include $(TOP)/configure/RULES_BUILD -#---------------------------------------- -# ADD RULES AFTER THIS LINE -