diff --git a/src/makeBaseExt/Makefile b/src/makeBaseExt/Makefile new file mode 100644 index 000000000..3bb2bed9c --- /dev/null +++ b/src/makeBaseExt/Makefile @@ -0,0 +1,28 @@ +TOP=../.. + +include $(TOP)/configure/CONFIG + +TEMPLATES_DIR = makeBaseExt + +TEMPLATES += top/Makefile +TEMPLATES += top/README +TEMPLATES += top/configure/CONFIG +TEMPLATES += top/configure/CONFIG_EXTENSIONS +TEMPLATES += top/configure/Makefile +TEMPLATES += top/configure/RELEASE +TEMPLATES += top/configure/RULES +TEMPLATES += top/configure/RULES_DIRS +TEMPLATES += top/configure/RULES_TOP + +TEMPLATES += $(subst ../,,$(wildcard ../top/configure/os/CONFIG*)) + +TEMPLATES += top/src/Makefile + +TEMPLATES += top/exampleExt/Makefile +TEMPLATES += top/exampleExt/caExample.c + +TEMPLATES += top/simpleExt/Makefile + +SCRIPTS += makeBaseExt.pl + +include $(TOP)/configure/RULES diff --git a/src/makeBaseExt/makeBaseExt.pl b/src/makeBaseExt/makeBaseExt.pl new file mode 100755 index 000000000..58ed2a14a --- /dev/null +++ b/src/makeBaseExt/makeBaseExt.pl @@ -0,0 +1,304 @@ +eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- + if $running_under_some_shell; # makeBaseExt + +# Authors: Ralph Lange and Marty Kraimer +# $Id$ + +use Cwd; +use Getopt::Std; +use File::Copy; +use File::Find; +use File::Path; + +$user = GetUser(); +$cwd = cwd(); +$eEXTTYPE = $ENV{EPICS_MBE_DEF_EXT_TYPE}; +$eTOP = $ENV{EPICS_MBE_TEMPLATE_TOP}; + +&get_commandline_opts; # Read and check options + +$extname = "@ARGV"; + +# +# Declare two default callback routines for file copy plus two +# hook routines to add conversions +# These may be overriden within $top/$exttypename/Replace.pl + +# First: the hooks +sub ReplaceFilenameHook { return $_[0]; } +sub ReplaceLineHook { return $_[0]; } + +# ReplaceFilename +# called with the source (template) file or directory name, returns +# the "real" name (which gets the target after $top is removed) +# Empty string: Don't copy this file +sub ReplaceFilename { # (filename) + my($file) = $_[0]; + $file =~ s|.*/CVS/?.*||; # Ignore CVS files + if ($ext) { # exttypenameExt itself is dynamic, too + $file =~ s|/$exttypename|/$extdir|; + $file =~ s|/$extdir/configure|/configure/$exttype|; + } + $file =~ s|_EXTNAME_|$extname|; + $file =~ s|_EXTTYPE_|$exttype|; + # We don't want the Replace overrides + $file =~ s|.*/$extdir/Replace.pl$||; + $file = &ReplaceFilenameHook($file); # Call the user-defineable hook + return $file; +} + +# ReplaceLine +# called with one line of a file, returns the line after replacing +# this and that +sub ReplaceLine { # (line) + my($line) = $_[0]; + $line =~ s/_USER_/$user/o; + $line =~ s/_EPICS_BASE_/$epics_base/o; + $line =~ s/_ARCH_/$arch/o; + $line =~ s/_EXTNAME_/$extname/o; + $line =~ s/_EXTTYPE_/$exttype/o; + $line =~ s/_TEMPLATE_TOP_/$top/o; + $line = &ReplaceLineHook($line); # Call the user-defineable hook + return $line; +} + +# Source replace overrides for file copy +if (-r "$top/$exttypename/Replace.pl") { + require "$top/$exttypename/Replace.pl"; +} + +# +# Copy files and trees from (non-Ext) if not present +# +opendir TOPDIR, "$top" or die "Can't open $top: $!"; +foreach $f ( grep !/^\.\.?$|^[^\/]*(Ext)/, readdir TOPDIR ) { + if (-f "$f") { + &CopyFile("$top/$f") unless (-e "$f"); + } else { + $note = yes if ("$f" eq "src" && -e "$f"); + find(\&FCopyTree, "$top/$f") unless (-e "$f"); + } +} +closedir TOPDIR; + +# +# Create ext directories (if any names given) +# +$cwdsave = $cwd; +$cwd = "$cwd/src"; +foreach $ext ( @ARGV ) { + ($extname = $ext) =~ s/Ext$//; + $extdir = $extname; + if (-d "src/$extdir") { + print "Extention $extname is already there!\n"; + next; + } + print "Creating template structure " + . "for $extname (of type $exttypename)\n" if $Debug; + find(\&FCopyTree, "$top/$exttypename/"); + if ($note) { + print "\nNOTE: You must add the line \"DIRS += $extname\" to src/Makefile.\n\n"; + } +} +$cwd = $cwdsave; + +exit 0; # END OF SCRIPT + +# +# Get commandline options and check for validity +# +sub get_commandline_opts { #no args + ($len = @ARGV) and getopts("ldit:T:b:a:") or Cleanup(1); + +# Debug option + $Debug = 1 if $opt_d; + +# Locate epics_base + my ($command) = UnixPath($0); + if ($opt_b) { # first choice is -b base + $epics_base = UnixPath($opt_b); + } elsif (-r "configure/RELEASE") { # second choice is configure/RELEASE + open(IN, "configure/RELEASE") or die "Cannot open configure/RELEASE"; + while () { + chomp; + s/EPICS_BASE\s*=\s*// and $epics_base = UnixPath($_), break; + } + close IN; + } elsif ($command =~ m|/bin/|) { # assume script was called with full path to base + $epics_base = $command; + $epics_base =~ s|(/.*)/bin/.*makeBaseExt.*|$1|; + } + "$epics_base" or Cleanup(1, "Cannot find EPICS base"); + +# Locate template top directory + if ($opt_T) { # first choice is -T templ-top + $top = UnixPath($opt_T); + } elsif (-r "configure/RELEASE") { # second choice is configure/RELEASE + open(IN, "configure/RELEASE") or die "Cannot open configure/RELEASE"; + while () { + chomp; + s/TEMPLATE_TOP\s*=\s*// and $top = UnixPath($_), break; + } + close IN; + } + if("$top" eq "") { + if ($eTOP) { # third choice is $ENV{EPICS_MBE_TEMPL_TOP} + $top = UnixPath($eTOP); + } else { # use templates from EPICS base + $top = $epics_base . "/templates/makeBaseExt/top"; + } + } + "$top" or Cleanup(1, "Cannot find template top directory"); + +# Print extension type list? + if ($opt_l) { + &ListExtTypes; + exit 0; # finished for -l command + } + +# Extention template type + if ($opt_t) { # first choice is -t type + $exttype = $opt_t; + } elsif ($eEXTTYPE) { # second choice is $ENV{EPICS_DEFAULT_EXT_TYPE} + $exttype = $eEXTTYPE; + } elsif (-r "$top/defaultExt") {# third choice is (a link) in the $top dir + $exttype = "default"; + } elsif (-r "$top/exampleExt") {# fourth choice is (a link) in the $top dir + $exttype = "example"; + } + $exttype =~ s/Ext$//; + "$exttype" or Cleanup(1, "Cannot find default extension type"); + $exttypename = $exttype . "Ext"; + +# Valid $exttypename? + unless (-r "$top/$exttypename") { + print "Template for extension type '$exttype' is unreadable or does not exist.\n"; + &ListExtTypes; + exit 1; + } + + print "\nCommand line / environment options validated:\n" + . " Templ-Top: $top\n" + . "Templ-Type: $exttype\n" + . "Templ-Name: $exttypename\n" + . "EPICS-Base: $epics_base\n\n" if $Debug; + +} + +# +# List extension types +# +sub ListExtTypes { # no args + print "Valid extension types are:\n"; + foreach $name (<$top/*Ext>) { + $name =~ s|$top/||; + $name =~ s|Ext||; + printf "\t$name\n" if ($name && -r "$top/$name" . "Ext"); + } +} + +# +# Copy a file with replacements +# +sub CopyFile { # (source) + $source = $_[0]; + $target = &ReplaceFilename($source); + + if ($target) { + $target =~ s|$top/||; + open(INP, "<$source") and open(OUT, ">$target") + or die "$! Copying $source -> $target"; + + print "Copying file $source -> $target\n" if $Debug; + while () { + print OUT &ReplaceLine($_); + } + close INP; close OUT; + } +} + +# +# Find() callback for file or structure copy +# +sub FCopyTree { + chdir $cwd; # Sigh + if (-d $File::Find::name + and ($dir = &ReplaceFilename($File::Find::name))) { + $dir =~ s|$top/||; + print "Creating directory $dir\n" if $Debug; + &mkpath($dir); + } else { + &CopyFile($File::Find::name); + } + chdir $File::Find::dir; +} + +# +# Cleanup and exit +# +sub Cleanup { # (return-code [ messsage-line1, line 2, ... ]) + my ($rtncode, @message) = @_; + + foreach $line ( @message ) { + print "$line\n"; + } + + print </bin//makeBaseExt.pl -t example example + +EOF + + exit $rtncode; +} + +sub GetUser { # no args + my ($user); + + # add to this list if new possibilities arise, + # currently it's UNIX and WIN32: + $user = $ENV{USER} || $ENV{USERNAME} || Win32::LoginName(); + + unless ($user) { + print "I cannot figure out your user name.\n"; + print "What shall you be called ?\n"; + print ">"; + $user = ; + chomp $user; + } + die "No user name" unless $user; + return $user; +} + +# replace "\" by "/" (for WINxx) +sub UnixPath { # path + my($newpath) = $_[0]; + $newpath =~ s|\\|/|go; + return $newpath; +} diff --git a/src/makeBaseExt/top/Makefile b/src/makeBaseExt/top/Makefile new file mode 100644 index 000000000..65238a7bb --- /dev/null +++ b/src/makeBaseExt/top/Makefile @@ -0,0 +1,9 @@ +# $Id$ + +TOP = . +include $(TOP)/configure/CONFIG +DIRS += configure +DIRS += src +include $(TOP)/configure/RULES_TOP + + diff --git a/src/makeBaseExt/top/README b/src/makeBaseExt/top/README new file mode 100644 index 000000000..c0e91eb9c --- /dev/null +++ b/src/makeBaseExt/top/README @@ -0,0 +1,5 @@ +Notes: + +Each time you add a new extension in the src directory you +must add the extension directory name to src/Makefile. + diff --git a/src/makeBaseExt/top/configure/CONFIG b/src/makeBaseExt/top/configure/CONFIG new file mode 100644 index 000000000..b3cfb5a6e --- /dev/null +++ b/src/makeBaseExt/top/configure/CONFIG @@ -0,0 +1,6 @@ +# $Id$ + +include $(TOP)/configure/CONFIG_EXTENSIONS +# Add any changes to make rules here + +#CROSS_COMPILER_TARGET_ARCHS = diff --git a/src/makeBaseExt/top/configure/CONFIG_EXTENSIONS b/src/makeBaseExt/top/configure/CONFIG_EXTENSIONS new file mode 100644 index 000000000..97da25ee7 --- /dev/null +++ b/src/makeBaseExt/top/configure/CONFIG_EXTENSIONS @@ -0,0 +1,31 @@ +# $Id$ + +include $(TOP)/configure/RELEASE +-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH) + +CONFIG=$(EPICS_BASE)/configure +include $(CONFIG)/CONFIG + +INSTALL_LOCATION = $(TOP) +ifdef INSTALL_LOCATION_EXTENSIONS +INSTALL_LOCATION = $(INSTALL_LOCATION_EXTENSIONS) +endif + +# Site specific host architecture definitions +-include $(TOP)/configure/os/CONFIG_SITE.$(EPICS_HOST_ARCH).Common + +ifdef T_A + +# Site specific target architecture definitions +-include $(TOP)/configure/os/CONFIG_SITE.Common.$(T_A) + +# Cross compile specific definitions +ifneq ($(EPICS_HOST_ARCH),$(T_A)) +-include $(TOP)/configure/CONFIG.CrossCommon +endif + +# Site specific host-target combination definitions +-include $(TOP)/configure/os/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A) + +endif + diff --git a/src/makeBaseExt/top/configure/Makefile b/src/makeBaseExt/top/configure/Makefile new file mode 100644 index 000000000..16168e3b3 --- /dev/null +++ b/src/makeBaseExt/top/configure/Makefile @@ -0,0 +1,8 @@ +# $Id$ + +TOP=.. + +include $(TOP)/configure/CONFIG + +include $(TOP)/configure/RULES + diff --git a/src/makeBaseExt/top/configure/RELEASE b/src/makeBaseExt/top/configure/RELEASE new file mode 100644 index 000000000..bcd07569e --- /dev/null +++ b/src/makeBaseExt/top/configure/RELEASE @@ -0,0 +1,5 @@ +# $Id$ + +# Location of external products +EPICS_BASE=_EPICS_BASE_ +TEMPLATE_TOP=_TEMPLATE_TOP_ diff --git a/src/makeBaseExt/top/configure/RULES b/src/makeBaseExt/top/configure/RULES new file mode 100644 index 000000000..dc23612c3 --- /dev/null +++ b/src/makeBaseExt/top/configure/RULES @@ -0,0 +1,4 @@ +# $Id$ + +include $(EPICS_BASE)/configure/RULES +include $(EPICS_BASE)/configure/RULES_JAVA diff --git a/src/makeBaseExt/top/configure/RULES_DIRS b/src/makeBaseExt/top/configure/RULES_DIRS new file mode 100644 index 000000000..580145fe8 --- /dev/null +++ b/src/makeBaseExt/top/configure/RULES_DIRS @@ -0,0 +1,3 @@ +# $Id$ + +include $(EPICS_BASE)/configure/RULES_DIRS diff --git a/src/makeBaseExt/top/configure/RULES_TOP b/src/makeBaseExt/top/configure/RULES_TOP new file mode 100644 index 000000000..c8e1ec7fe --- /dev/null +++ b/src/makeBaseExt/top/configure/RULES_TOP @@ -0,0 +1,4 @@ +# $Id$ + +include $(EPICS_BASE)/configure/RULES_TOP + diff --git a/src/makeBaseExt/top/configure/os/CONFIG_SITE.Common.Common b/src/makeBaseExt/top/configure/os/CONFIG_SITE.Common.Common new file mode 100644 index 000000000..8e608e701 --- /dev/null +++ b/src/makeBaseExt/top/configure/os/CONFIG_SITE.Common.Common @@ -0,0 +1,11 @@ +# +# $Id$ +# +# Site Specific Configuration Information +# Only the local epics system manager should modify this file + +# java jdk definitions +CLASSPATH = -classpath .:..:$(INSTALL_JAVA):$(JAVA_DIR)/bin/../classes:$(JAVA_DIR)/bin/../lib/classes.zip +JAVACCMD = $(subst \,/,$(JAVA_DIR)/bin/javac$(EXE) $(CLASSPATH) $(JAVAC_FLAGS) ) +JAVAHCMD = $(subst \,/,$(JAVA_DIR)/bin/javah$(EXE) -jni $(CLASSPATH) $(JAVAH_FLAGS)) +JARCMD = $(subst \,/,$(JAVA_DIR)/bin/jar$(EXE) $(JAR_OPTIONS) $(MANIFEST) $(JAR) $(JAR_INPUT)) diff --git a/src/makeBaseExt/top/configure/os/CONFIG_SITE.hpux-parisc.hpux-parisc b/src/makeBaseExt/top/configure/os/CONFIG_SITE.hpux-parisc.hpux-parisc new file mode 100644 index 000000000..ff707b847 --- /dev/null +++ b/src/makeBaseExt/top/configure/os/CONFIG_SITE.hpux-parisc.hpux-parisc @@ -0,0 +1,29 @@ +# +# $Id$ +# +# Site Specific Configuration Information +# Only the local epics system manager should modify this file + +# Where to find utilities/libraries +# If you do not have a certain product, +# leave the line empty. +# + +-include $(TOP)/configure/os/CONFIG_SITE.Common.Common + +# Where to find utilities/libraries +X11_INC = /usr/include/X11R5 +X11_LIB = /usr/lib/X11R5 +MOTIF_INC = /usr/include/Motif1.2 +MOTIF_LIB = /usr/lib/Motif1.2 +INTERVIEWS_BIN=/usr/local/interviews/bin/O.hp700 +XRTGRAPH = /usr/csite/xrt +OPENWIN = /usr/csite4/local/xview +WINGZ_INC = /usr/local/Wingz2/incl +WINGZ_LIB = /usr/local/Wingz2/lib +MATHEMATICA = /usr/local/math +QUESTWIN = /usr/local/questwin +IDL = /usr/csite/idl +JAVA_DIR=/usr/local/java +JAVA_INC=$(JAVA_DIR)/include + diff --git a/src/makeBaseExt/top/configure/os/CONFIG_SITE.linux-x86.linux-x86 b/src/makeBaseExt/top/configure/os/CONFIG_SITE.linux-x86.linux-x86 new file mode 100644 index 000000000..0fb79a8ab --- /dev/null +++ b/src/makeBaseExt/top/configure/os/CONFIG_SITE.linux-x86.linux-x86 @@ -0,0 +1,41 @@ +# +# $Id$ +# +# Site Specific Configuration Information +# Only the local epics system manager should modify this file + +# Where to find utilities/libraries +# If you do not have a certain product, +# leave the line empty. +# + +-include $(TOP)/configure/os/CONFIG_SITE.Common.Common + +#X11_LIB=/usr/X11R6/lib +#X11_INC=/usr/X11R6/include/X11 +#MOTIF_LIB=/usr/X11R6/lib +#MOTIF_INC=/usr/X11R6/include +X11_INC=/local2/X11R6/include/X11 +X11_LIB=/local2/X11R6/lib +MOTIF_LIB=/local2/X11R6/lib +MOTIF_INC=/local2/X11R6/include + +OPENWIN = +WINGZ = +MATHEMATICA = +SCIPLOT=YES +XRTGRAPH = +QUESTWIN = +TK_TCL = /usr/lib +IDL = + +JAVA_DIR=/usr/local/java +JAVA_INC=$(JAVA_DIR)/include + +INTERVIEWS_BIN=/usr/local/interviews/bin/O.Linux + +IV_INC=/usr/local/interviews/include +IV_BIN=/usr/local/interviews/bin/O.Linux +IV_LIB=/usr/local/interviews/lib/O.Linux + + diff --git a/src/makeBaseExt/top/configure/os/CONFIG_SITE.osf-alpha.osf-alpha b/src/makeBaseExt/top/configure/os/CONFIG_SITE.osf-alpha.osf-alpha new file mode 100644 index 000000000..ec5021302 --- /dev/null +++ b/src/makeBaseExt/top/configure/os/CONFIG_SITE.osf-alpha.osf-alpha @@ -0,0 +1,29 @@ +# +# $Id$ +# +# Site Specific Configuration Information +# Only the local epics system manager should modify this file + +# Where to find utilities/libraries +# If you do not have a certain product, +# leave the line empty. +# + +-include $(TOP)/configure/os/CONFIG_SITE.Common.Common + +# Where to find utilities/libraries +X11_LIB = /usr/lib +X11_INC = /usr/include +MOTIF_INC = /usr/include +MOTIF_LIB = /usr/lib +INTERVIEWS_BIN=/usr/local/interviews/bin/O.alpha +OPENWIN = +WINGZ = +MATHEMATICA = +XRTGRAPH = /usr/local/xrtgraph +QUESTWIN = +IDL = +JAVA_DIR=/usr/local/java +JAVA_INC=$(JAVA_DIR)/include + + diff --git a/src/makeBaseExt/top/configure/os/CONFIG_SITE.solaris-sparc.solaris-sparc b/src/makeBaseExt/top/configure/os/CONFIG_SITE.solaris-sparc.solaris-sparc new file mode 100644 index 000000000..dd158493e --- /dev/null +++ b/src/makeBaseExt/top/configure/os/CONFIG_SITE.solaris-sparc.solaris-sparc @@ -0,0 +1,65 @@ +# +# $Id$ +# +# Site Specific Configuration Information +# Only the local epics system manager should modify this file + +# Where to find utilities/libraries +# If you do not have a certain product, +# leave the line empty. +# + +-include $(TOP)/configure/os/CONFIG_SITE.Common.Common + +# sun X11 +X11_LIB = /usr/openwin/lib +X11_INC = /usr/openwin/include +# mit X11 +#X11_LIB = /opt/X11R5/lib +#X11_INC = /opt/X11R5/include +# osf motif +#MOTIF_INC = /opt/local/Motif2.0/include +#MOTIF_LIB = /opt/local/Motif2.0/lib +# sun SDK motif +#MOTIF_INC = /opt/SUNWmotif/include +#MOTIF_LIB = /opt/SUNWmotif/lib +# sun 5.4,5.6 SDK motif +MOTIF_INC = /usr/dt/include +MOTIF_LIB = /usr/dt/lib +OPENWIN = /usr/openwin + +INTERVIEWS_BIN=/usr/local/interviews/bin/O.solaris +INTERVIEWS_LIB=/usr/local/interviews/lib/O.solaris +IV_INC=/usr/local/interviews/include +IV-2_6_INC=/usr/local/interviews/include/IV-2_6 +IV_BIN=/usr/local/interviews/bin/O.solaris +IV_LIB=/usr/local/interviews/lib/O.solaris + +WINGZ_INC = /opt/local/Wingz2/incl +WINGZ_LIB = /opt/local/Wingz2/lib +#MATHEMATICA = /usr/local/math +# Define XRTGRAPH_EXTENSIONS = YES only if using XRT/graph 3.x +# and you want the extensions for MEDM +XRTGRAPH_EXTENSIONS = YES +XRTGRAPH = /opt/local/xrtgraph +QUESTWIN = /usr/local/questwin + +TK_LIB = /opt/local/lib +TK_INC = /opt/local/include +TCL_LIB = /opt/local/lib +TCL_INC = /opt/local/include +DP_LIB = /opt/local/lib +DP_INC = /opt/local/include +BLT_LIB = /opt/local/lib +BLT_INC = /opt/local/include + +IDL = /usr/local/idl +# IDL=$(IDL)/external/rpc is the sun4 version +IDLRPC = $(IDL)/external/rpc.solaris + +# sun 5.4 +#JAVA_DIR=/opt/local/java +# sun 5.6 +JAVA_DIR=/usr/java +JAVA_INC=$(JAVA_DIR)/include + diff --git a/src/makeBaseExt/top/configure/os/CONFIG_SITE.win32-x86.win32-x86 b/src/makeBaseExt/top/configure/os/CONFIG_SITE.win32-x86.win32-x86 new file mode 100644 index 000000000..4f029361f --- /dev/null +++ b/src/makeBaseExt/top/configure/os/CONFIG_SITE.win32-x86.win32-x86 @@ -0,0 +1,60 @@ +# +# $Id$ +# +# Site Specific Configuration Information +# Only the local epics system manager should modify this file + +# Where to find utilities/libraries +# If you do not have a certain product, +# leave the line empty. +# + +-include $(TOP)/configure/os/CONFIG_SITE.Common.Common + +EXCEED = Exceed6.1 + +JAVA_DIR = c:\\jdk1.3 +JAVA_INC = $(JAVA_DIR)/include + +TCL = c:\\Tcl +TK_LIB = $(TCL)/lib +TK_INC = $(TCL)/include +TCL_LIB = $(TCL)/lib +TCL_INC = $(TCL)/include +DP_LIB = $(TCL)/lib +DP_INC = $(TCL)/include +BLT_LIB = $(TCL)/lib +BLT_INC = $(TCL)/include + +IDL = /usr/local/idl +# IDL=$(IDL)/external/rpc is the sun4 version +IDLRPC = $(IDL)/external/rpc.solaris + +ifeq ($(EXCEED),Exceed5) +# Exceed 5 +X11_LIB = c:/exceed5/xdk/lib +X11_INC = c:/exceed5/xdk/include +MOTIF_LIB = $(X11_LIB) +MOTIF_INC = $(X11_INC) +else +# Exceed 6 and 6.1 +X11_LIB = c:/exceed/xdk/lib +X11_INC = c:/exceed/xdk/include +MOTIF_LIB = $(X11_LIB) +MOTIF_INC = $(X11_INC) +endif + +OPENWIN = +INTERVIEWS_BIN = +WINGZ_INC = +WINGZ_LIB = +MATHEMATICA = +QUESTWIN = + +# Define XRTGRAPH_EXTENSIONS = YES only if using XRT/graph 3.x +# and you want the extensions for MEDM +XRTGRAPH_EXTENSIONS = NO +XRTGRAPH = + +SCIPLOT = ../../src/medmdev/medm + diff --git a/src/makeBaseExt/top/exampleExt/Makefile b/src/makeBaseExt/top/exampleExt/Makefile new file mode 100644 index 000000000..ea4bd71d5 --- /dev/null +++ b/src/makeBaseExt/top/exampleExt/Makefile @@ -0,0 +1,13 @@ +TOP=../.. +include $(TOP)/configure/CONFIG + +PROD_HOST = caExample +caExample_SRCS += caExample.cc +#caExample_CFLAGS += +#caExample_LDFLAGS += +caExample_LIBS += ca Com +ca_LIB=$(EPICS_BASE_LIB) +Com_LIB=$(EPICS_BASE_LIB) + +include $(TOP)/configure/RULES + diff --git a/src/makeBaseExt/top/exampleExt/caExample.c b/src/makeBaseExt/top/exampleExt/caExample.c new file mode 100644 index 000000000..04e57197e --- /dev/null +++ b/src/makeBaseExt/top/exampleExt/caExample.c @@ -0,0 +1,25 @@ +/*caExample.c*/ +#include +#include +#include +#include + +#include "cadef.h" + +main(int argc,char **argv) +{ + double data; + chid mychid; + + if(argc != 2) { + fprintf(stderr,"usage: caExample pvname\n"); + exit(1); + } + SEVCHK(ca_task_initialize(),"ca_task_initialize"); + SEVCHK(ca_search(argv[1],&mychid),"ca_search failure"); + SEVCHK(ca_pend_io(5.0),"ca_pend_io failure"); + SEVCHK(ca_get(DBR_DOUBLE,mychid,(void *)&data),"ca_get failure"); + SEVCHK(ca_pend_io(5.0),"ca_pend_io failure"); + printf("%s %f\n",argv[1],data); + return(0); +} diff --git a/src/makeBaseExt/top/simpleExt/Makefile b/src/makeBaseExt/top/simpleExt/Makefile new file mode 100644 index 000000000..52cfac525 --- /dev/null +++ b/src/makeBaseExt/top/simpleExt/Makefile @@ -0,0 +1,21 @@ +TOP=../.. +include $(TOP)/configure/CONFIG + +# Product +#PROD_HOST = caExample +#caExample_SRCS += caExample.cc +#caExample_CFLAGS += +#caExample_LDFLAGS += +#caExample_LIBS += ca Com +#ca_LIB=$(EPICS_BASE_LIB) +#Com_LIB=$(EPICS_BASE_LIB) + +# Library +#LIBRARY_HOST = abc +#abc_SRCS += abc.c +#abc_DLL_LIBS = ca Com + + +include $(TOP)/configure/RULES + + diff --git a/src/makeBaseExt/top/src/Makefile b/src/makeBaseExt/top/src/Makefile new file mode 100644 index 000000000..7696b2f30 --- /dev/null +++ b/src/makeBaseExt/top/src/Makefile @@ -0,0 +1,9 @@ +# $Id$ + +TOP = .. +include $(TOP)/configure/CONFIG + +DIRS += _EXTNAME_ + +include $(TOP)/configure/RULES_DIRS +