]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
*** empty log message ***
authorhades <hades>
Thu, 31 Aug 2000 13:42:12 +0000 (13:42 +0000)
committerhades <hades>
Thu, 31 Aug 2000 13:42:12 +0000 (13:42 +0000)
allParam/test/Makefile

index c57c7cccedb51d0a144f68c0ccf49eb6874a3e82..b1d419f726e6813df285db22548945f412fd4f41 100644 (file)
@@ -1,46 +1,82 @@
-# Tcl test
-CFLAGS = -I$(HOME)/include/tcl
-LOADLIBES = -L$(HOME)/lib/$(SYSTYPE) -ltclParam -ltcl -lm -ldl
+CC = gcc
+MV = mv
+
+# Channel Access test
+HOST_ARCH = Linux
+EPICS_HOME = $(HOME)/hades/epics
+EPICS_BASE = $(EPICS_HOME)/base
+CACFLAGS = -I$(HOME)/include/ca
+LOADCALIBES = -L$(HOME)/lib/$(SYSTYPE) -L$(EPICS_BASE)/lib/$(HOST_ARCH) \
+  -lcaParam -lca -lCom
 
 # File test
-#CFLAGS = -I$(HOME)/include/file
-#LOADLIBES = -L$(HOME)/lib/$(SYSTYPE) -lfileParam
+FILECFLAGS = -I$(HOME)/include/file
+LOADFILELIBES = -L$(HOME)/lib/$(SYSTYPE) -lfileParam
 
 # Oracle test
-#ORACLE_HOME = /usr/local/oracle/product/8.0.5
-#CFLAGS = -I$(HOME)/include/ora
-#LOADLIBES = -L$(HOME)/lib/$(SYSTYPE) -L$(ORACLE_HOME)/lib \
-#  -loraParam -lsql -lclntsh -lcommon -lcore4 -lnlsrtl3
+ORACLE_HOME = /usr/local/oracle/product/8.0.5
+ORACFLAGS = -I$(HOME)/include/ora
+LOADORALIBES = -L$(HOME)/lib/$(SYSTYPE) -L$(ORACLE_HOME)/lib \
+  -loraParam -lsql -lclntsh -lcommon -lcore4 -lnlsrtl3
 
 # PostgreSQL test
-#CFLAGS = -I$(HOME)/include/psql
-#LOADLIBES = -L$(HOME)/lib/$(SYSTYPE) -lpsqlParam -lpq -lcrypt
+PSQLCFLAGS = -I$(HOME)/include/psql
+LOADPSQLLIBES = -L$(HOME)/lib/$(SYSTYPE) -lpsqlParam -lpq -lcrypt
 
-# Channel Access test
-#HOST_ARCH = Linux
-#EPICS_HOME = $(HOME)/hades/epics
-#EPICS_BASE = $(EPICS_HOME)/base
-#CFLAGS = -I$(HOME)/include/ca
-#LOADLIBES = -L$(HOME)/lib/$(SYSTYPE) -L$(EPICS_HOME)/lib/$(HOST_ARCH) \
-#  -lcaParam -lca -lCom
+# Tcl test
+TCLCFLAGS = -I$(HOME)/include/tcl
+LOADTCLLIBES = -L$(HOME)/lib/$(SYSTYPE) -ltclParam -ltcl -lm -ldl
 
 TESTS = test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 \
   test12 test13 test14 test15 test16 test17 test18 test19 test20
 
 OBJS = suite.o $(addsuffix .o,$(TESTS))
 
-suite : $(OBJS)
-       $(CC) $(LDFLAGS) $(OBJS) $(LOADLIBES) -o $@
+suite : ca_suite file_suite ora_suite psql_suite tcl_suite
+
+ca_suite : $(addprefix ca_,$(OBJS))
+       $(CC) $(LDFLAGS) $(addprefix ca_,$(OBJS)) $(LOADCALIBES) -o $@
+
+file_suite : $(addprefix file_,$(OBJS))
+       $(CC) $(LDFLAGS) $(addprefix file_,$(OBJS)) $(LOADFILELIBES) -o $@
+
+ora_suite : $(addprefix ora_,$(OBJS))
+       $(CC) $(LDFLAGS) $(addprefix ora_,$(OBJS)) $(LOADORALIBES) -o $@
+
+psql_suite : $(addprefix psql_,$(OBJS))
+       $(CC) $(LDFLAGS) $(addprefix psql_,$(OBJS)) $(LOADPSQLLIBES) -o $@
+
+tcl_suite : $(addprefix tcl_,$(OBJS))
+       $(CC) $(LDFLAGS) $(addprefix tcl_,$(OBJS)) $(LOADTCLLIBES) -o $@
+
+$(addprefix ca_,$(OBJS)) :
+       $(MAKE) $(patsubst ca_%,%,$@) "CFLAGS=$(CACFLAGS)"
+       $(MV) $(patsubst ca_%,%,$@) $@
+
+$(addprefix file_,$(OBJS)) :
+       $(MAKE) $(patsubst file_%,%,$@) "CFLAGS=$(FILECFLAGS)"
+       $(MV) $(patsubst file_%,%,$@) $@
+
+$(addprefix ora_,$(OBJS)) :
+       $(MAKE) $(patsubst ora_%,%,$@) "CFLAGS=$(ORACFLAGS)"
+       $(MV) $(patsubst ora_%,%,$@) $@
+
+$(addprefix psql_,$(OBJS)) :
+       $(MAKE) $(patsubst psql_%,%,$@) "CFLAGS=$(PSQLCFLAGS)"
+       $(MV) $(patsubst psql_%,%,$@) $@
 
-new :
-       $(MAKE) -W suite.o suite
+$(addprefix tcl_,$(OBJS)) :
+       $(MAKE) $(patsubst tcl_%,%,$@) "CFLAGS=$(TCLCFLAGS)"
+       $(MV) $(patsubst tcl_%,%,$@) $@
 
 suite.o : suite.c $(addsuffix .h, $(TESTS))
+       $(CC) -c $(CFLAGS) $(patsubst %.o,%.c,$@) -o $@
 $(addsuffix .o, $(TESTS)) : $(patsubst %.o,%.c,$@) $(patsubst %.o,%.h,$@)
+       $(CC) -c $(CFLAGS) $(patsubst %.o,%.c,$@) -o $@
 
 clean :
        rm -f *.o
 
 bin_clean :
-       rm *.o suite
+       rm *.o *_suite