Makefile

changeset 152
3238f65db163
parent 103
08018864fb91
child 154
8346aebfbb7b
equal deleted inserted replaced
151:fc8d05972af7 152:3238f65db163
27 # 27 #
28 28
29 29
30 # 30 #
31 # available configurations: 31 # available configurations:
32 # gcc 32 # clang, clang-debug
33 # suncc 33 # gcc, gcc-debug
34 # g++, g++-debug
35 # osx, osx-debug
36 # suncc, suncc-debug
34 # windows 37 # windows
35 # osx
36 # 38 #
37 39
38 #ifndef CONF 40 CONF=gcc
39 CONF=gcc 41 PREFIX=/usr/local
40 #endif
41 42
43 include unix.mk
42 include $(CONF).mk 44 include $(CONF).mk
43
44 all: ucx test
45 45
46 ucx: FORCE 46 ucx: FORCE
47 cd ucx; $(MAKE) CONF=$(CONF) all 47 cd ucx; $(MAKE) CONF=$(CONF) all
48 48
49 test: FORCE ucx 49 test: FORCE ucx
50 cd test; $(MAKE) CONF=$(CONF) all 50 cd test; $(MAKE) CONF=$(CONF) all
51 51
52 run: FORCE test 52 run: FORCE test
53 ./build/test$(APP_EXT) 53 ./build/test$(APP_EXT)
54 54
55 install: ucx | $(PREFIX)/include/ucx $(PREFIX)/lib
56 cp ./build/libucx$(LIB_EXT) $(PREFIX)/lib && \
57 cp ./ucx/*.h $(PREFIX)/include/ucx
58
59 uninstall:
60 $(RM) $(RMFLAGS) $(PREFIX)/include/ucx &&\
61 $(RM) $(RMFLAGS) $(PREFIX)/lib/libucx$(LIB_EXT)
62
63 $(PREFIX)/lib:
64 mkdir -p $(PREFIX)/lib
65
66 $(PREFIX)/include/ucx:
67 mkdir -p $(PREFIX)/include/ucx
68
55 clean: FORCE 69 clean: FORCE
56 $(RM) $(RMFLAGS) build/*.${OBJ_EXT} 70 $(RM) $(RMFLAGS) build
57 $(RM) $(RMFLAGS) build/*.${LIB_EXT}
58 71
59 FORCE: 72 FORCE:
60 73

mercurial