Converted to new build method.

This commit is contained in:
Janet B. Anderson
2000-01-26 20:32:07 +00:00
parent e30336aee7
commit f3eed80f2d
20 changed files with 102 additions and 332 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -0,0 +1,2 @@
#CONFIG
include $(EPICS_BASE)/configure/RULES

View File

@@ -1,2 +0,0 @@
#RULES_ARCHS
include $(EPICS_BASE)/configure/RULES_ARCHS

View File

@@ -1,3 +0,0 @@
#RULES_BUILD
include $(EPICS_BASE)/configure/RULES_BUILD
include $(TOP)/configure/RULES.registerRecordDeviceDriver

View File

@@ -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 = <IN>) {
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;

View File

@@ -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 = <IN>;
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: $!";

View File

@@ -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 = <IN>) {
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;

View File

@@ -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 (<STDIN>) {
s/VAR\(/\$\(/g;
s/VAR_([^_]*)_/\$\($1\)/g;
print;
}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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