# 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
+CACFLAGS = -g -ansi -Wall -I../ca
+LOADCALIBES = -L../ca -L$(EPICS_BASE)/lib/$(HOST_ARCH) -lcaParam -lca -lCom
# File test
-FILECFLAGS = -I$(HOME)/include/file
-LOADFILELIBES = -L$(HOME)/lib/$(SYSTYPE) -lfileParam
+FILECFLAGS = -g -ansi -Wall -I../file
+LOADFILELIBES = -L../file -lfileParam
# Oracle test
ORACLE_HOME = /usr/local/oracle/product/8.0.5
-ORACFLAGS = -I$(HOME)/include/ora
-LOADORALIBES = -L$(HOME)/lib/$(SYSTYPE) -L$(ORACLE_HOME)/lib \
+ORACFLAGS = -g -ansi -Wall -I../ora
+LOADORALIBES = -L../ora -L$(ORACLE_HOME)/lib \
-loraParam -lsql -lclntsh -lcommon -lcore4 -lnlsrtl3
# PostgreSQL test
-PSQLCFLAGS = -I$(HOME)/include/psql
-LOADPSQLLIBES = -L$(HOME)/lib/$(SYSTYPE) -lpsqlParam -lpq -lcrypt
+PSQLCFLAGS = -g -ansi -Wall -I../psql
+LOADPSQLLIBES = -L../psql -lpsqlParam -lpq -lcrypt
# Tcl test
-TCLCFLAGS = -I$(HOME)/include/tcl
-LOADTCLLIBES = -L$(HOME)/lib/$(SYSTYPE) -ltclParam -ltcl8.0 -lm -ldl
+TCLCFLAGS = -g -ansi -Wall -I../tcl
+LOADTCLLIBES = -L../tcl -ltclParam -ltcl8.0 -lm -ldl
TESTS = test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 \
test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 test22
suite : $(addsuffix _suite,$(LIBS))
-test : $(addsuffix _suite_new,$(LIBS))
- time ./ca_suite > test_protocol.txt 2>&1
- time ./file_suite >> test_protocol.txt 2>&1
- time ./ora_suite >> test_protocol.txt 2>&1
- time ./psql_suite >> test_protocol.txt 2>&1
- time ./tcl_suite >> test_protocol.txt 2>&1
+ca_test file_test ora_test psql_test tcl_test :
+ $(RM) $@_suite
+ $(MAKE) $@_suite
+ time ./$@_suite > $@_protocol.txt 2>&1
-$(addsuffix _suite_new,$(LIBS)) :
- $(RM) $(patsubst %_new,%,$@)
- $(MAKE) $(patsubst %_new,%,$@)
-
-ca_suite : $(addprefix ca_,$(OBJS))
+ca_test_suite : $(addprefix ca_,$(OBJS))
$(CC) $(LDFLAGS) $(addprefix ca_,$(OBJS)) $(LOADCALIBES) -o $@
-file_suite : $(addprefix file_,$(OBJS))
+file_test_suite : $(addprefix file_,$(OBJS))
$(CC) $(LDFLAGS) $(addprefix file_,$(OBJS)) $(LOADFILELIBES) -o $@
-ora_suite : $(addprefix ora_,$(OBJS))
+ora_test_suite : $(addprefix ora_,$(OBJS))
$(CC) $(LDFLAGS) $(addprefix ora_,$(OBJS)) $(LOADORALIBES) -o $@
-psql_suite : $(addprefix psql_,$(OBJS))
+psql_test_suite : $(addprefix psql_,$(OBJS))
$(CC) $(LDFLAGS) $(addprefix psql_,$(OBJS)) $(LOADPSQLLIBES) -o $@
-tcl_suite : $(addprefix tcl_,$(OBJS))
+tcl_test_suite : $(addprefix tcl_,$(OBJS))
$(CC) $(LDFLAGS) $(addprefix tcl_,$(OBJS)) $(LOADTCLLIBES) -o $@
$(addprefix ca_,$(OBJS)) :
$(MV) $(patsubst tcl_%,%,$@) $@
suite.o : suite.c $(addsuffix .h, $(TESTS))
- $(CC) -c $(CFLAGS) $(patsubst %.o,%.c,$@) -o $@
+ $(CC) -c $(CFLAGS) $(suite.c,$@) -o $@
$(addsuffix .o, $(TESTS)) : $(patsubst %.o,%.c,$@) $(patsubst %.o,%.h,$@)
$(CC) -c $(CFLAGS) $(patsubst %.o,%.c,$@) -o $@
clean :
- rm -f *.o test_protocol.txt sqlnet.log
+ rm -f *.o *test_protocol.txt sqlnet.log
bin_clean :
- rm *.o *_suite test_protocol.txt sqlnet.log
+ rm *.o *_suite *test_protocol.txt sqlnet.log
+
+ca_test file_test ora_test psql_test tcl_test : dummy