source: libcf/trunk/test/makefile@ 105

Last change on this file since 105 was 105, checked in by cheese, 11 years ago

#1 remove integrated test code

File size: 1.2 KB
Line 
1#----------------------------------------------------------
2# platform
3#----------------------------------------------------------
4include ../makeinclude/userdefine.mk
5include ../makeinclude/platform.mk
6
7#----------------------------------------------------------
8# env
9#----------------------------------------------------------
10TARGET_PATH = ../_build
11OBJ_PATH = ../_obj
12
13INCLUDES = -I../include
14LIBS = -L$(TARGET_PATH) -lcf -lpthread
15
16LIB_CF = $(TARGET_PATH)/lib$(TARGET_PATH).$(EXT_SHARED)
17
18#----------------------------------------------------------
19# label
20#----------------------------------------------------------
21all: dep
22 @echo ========== Complete CHEROXY compilation ==========
23dep: $(OBJ_PATH) $(TARGET_PATH) $(LIB_CF)
24
25$(TARGET_PATH): dummy
26 @if [ ! -d $@ ] ; then mkdir $@ ; fi
27$(OBJ_PATH): dummy
28 @if [ ! -d $@ ] ; then mkdir $@ ; fi
29$(LIB_CF): dummy
30 cd ../src; make all;
31
32test:
33 make $(shell ls *.c | awk -F. '{ print $$1 }')
34
35%: %.c
36 make dep
37 $(CC) $(CDEFS) $(CFLAGS) $(INCLUDES) $(LDFLAGS) -o $(TARGET_PATH)/$@.$(EXT_EXECUTE) $? $(LIBS)
38 cd $(TARGET_PATH); LD_LIBRARY_PATH=. ./$@.$(EXT_EXECUTE)
39
40clean: dummy
41 rm -rf *.txt
42 rm -rf $(TARGET_PATH) $(OBJ_PATH)
43
44dummy:
Note: See TracBrowser for help on using the repository browser.