1 2 3 ifeq ($(NEOTONIC_ROOT),) 4 NEOTONIC_ROOT = ../../ 5 endif 6 7 include $(NEOTONIC_ROOT)rules.mk 8 9 HDFTEST_EXE = hdftest 10 HDFTEST_SRC = hdftest.c 11 HDFTEST_OBJ = $(HDFTEST_SRC:%.c=%.o) 12 13 HDFSORTTEST_EXE = hdf_sort_test 14 HDFSORTTEST_SRC = hdf_sort_test.c 15 HDFSORTTEST_OBJ = $(HDFSORTTEST_SRC:%.c=%.o) 16 17 HDFLOADTEST_EXE = hdfloadtest 18 HDFLOADTEST_SRC = hdfloadtest.c 19 HDFLOADTEST_OBJ = $(HDFLOADTEST_SRC:%.c=%.o) 20 21 LISTDIRTEST_EXE = listdir_test 22 LISTDIRTEST_SRC = listdir_test.c 23 LISTDIRTEST_OBJ = $(LISTDIRTEST_SRC:%.c=%.o) 24 25 HDFCOPYTEST_EXE = hdf_copy_test 26 HDFCOPYTEST_SRC = hdf_copy_test.c 27 HDFCOPYTEST_OBJ = $(HDFCOPYTEST_SRC:%.c=%.o) 28 29 HDFDEALLOCTEST_EXE = hdf_dealloc_test 30 HDFDEALLOCTEST_SRC = hdf_dealloc_test.c 31 HDFDEALLOCTEST_OBJ = $(HDFDEALLOCTEST_SRC:%.c=%.o) 32 33 NETTEST_EXE = net_test 34 NETTEST_SRC = net_test.c 35 NETTEST_OBJ = $(NETTEST_SRC:%.c=%.o) 36 37 DATETEST_EXE = date_test 38 DATETEST_SRC = date_test.c 39 DATETEST_OBJ = $(DATETEST_SRC:%.c=%.o) 40 41 HASHTEST_EXE = hash_test 42 HASHTEST_SRC = hash_test.c 43 HASHTEST_OBJ = $(HASHTEST_SRC:%.c=%.o) 44 45 ULISTTEST_EXE = ulist_test 46 ULISTTEST_SRC = ulist_test.c 47 ULISTTEST_OBJ = $(ULISTTEST_SRC:%.c=%.o) 48 49 CFLAGS += -I$(NEOTONIC_ROOT)/util 50 LIBS += -lneo_utl 51 52 TARGETS = $(HDFTEST_EXE) $(LISTDIRTEST_EXE) $(HDFCOPYTEST_EXE) \ 53 $(HDFSORTTEST_EXE) $(HDFDEALLOCTEST_EXE) \ 54 $(HDFLOADTEST_EXE) $(NETTEST_EXE) $(DATETEST_EXE) \ 55 $(HASHTEST_EXE) $(ULISTTEST_EXE) 56 57 all: $(TARGETS) 58 59 $(ULISTTEST_EXE): $(ULISTTEST_OBJ) $(NTR_LIB) 60 $(LD) $@ $(ULISTTEST_OBJ) $(LDFLAGS) $(LIBS) 61 62 $(HDFTEST_EXE): $(HDFTEST_OBJ) $(NTR_LIB) 63 $(LD) $@ $(HDFTEST_OBJ) $(LDFLAGS) $(LIBS) 64 65 $(HDFSORTTEST_EXE): $(HDFSORTTEST_OBJ) $(NTR_LIB) 66 $(LD) $@ $(HDFSORTTEST_OBJ) $(LDFLAGS) $(LIBS) 67 68 $(HDFDEALLOCTEST_EXE): $(HDFDEALLOCTEST_OBJ) $(NTR_LIB) 69 $(LD) $@ $(HDFDEALLOCTEST_OBJ) $(LDFLAGS) $(LIBS) 70 71 $(HDFLOADTEST_EXE): $(HDFLOADTEST_OBJ) $(NTR_LIB) 72 $(LD) $@ $(HDFLOADTEST_OBJ) $(LDFLAGS) $(LIBS) # -lefence 73 74 $(LISTDIRTEST_EXE): $(LISTDIRTEST_OBJ) $(NTR_LIB) 75 $(LD) $@ $(LISTDIRTEST_OBJ) $(LDFLAGS) $(LIBS) 76 77 $(HDFCOPYTEST_EXE): $(HDFCOPYTEST_OBJ) $(NTR_LIB) 78 $(LD) $@ $(HDFCOPYTEST_OBJ) $(LDFLAGS) $(LIBS) # -lefence 79 80 $(NETTEST_EXE): $(NETTEST_OBJ) $(NTR_LIB) 81 $(LD) $@ $(NETTEST_OBJ) $(LDFLAGS) $(LIBS) 82 83 $(DATETEST_EXE): $(DATETEST_OBJ) $(NTR_LIB) 84 $(LD) $@ $(DATETEST_OBJ) $(LDFLAGS) $(LIBS) 85 86 $(HASHTEST_EXE): $(HASHTEST_OBJ) $(NTR_LIB) 87 $(LD) $@ $(HASHTEST_OBJ) $(LDFLAGS) $(LIBS) # -lefence 88 89 clean: 90 $(RM) *.o 91 92 distclean: 93 $(RM) $(TARGETS) *.o 94