-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (51 loc) · 2.08 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
CC = gcc
AR = ar
OBJS = obj/libio.o obj/libmisc.o obj/libclient.o obj/libuser.o obj/libsh.o
LDFLAGS = -L${PWD} -Wl,-rpath=${PWD}
CFLAGS = -Werror -Iinclude -O2 -g -fPIC -std=gnu99
PREFIX=/usr/local
all:
@echo "CC libio.o"
@${CC} -c lib/libio.c -o obj/libio.o ${CFLAGS}
@echo "CC libmisc.o"
@${CC} -c lib/libmisc.c -o obj/libmisc.o ${CFLAGS}
@echo "CC libclient.o"
@${CC} -c lib/libclient.c -o obj/libclient.o ${CFLAGS}
@echo "CC libuser.o"
@${CC} -c lib/libuser.c -o obj/libuser.o ${CFLAGS}
@echo "CC libsh.o"
@${CC} -c lib/libsh.c -o obj/libsh.o ${CFLAGS}
@echo "AR libsm.a"
@${AR} rcs libsm.a ${OBJS}
@echo "LDCC libsm.so"
@${CC} -o libsm.so ${OBJS} -shared ${LDFLAGS} ${CFLAGS}
@echo "LDCC server.proto"
@${CC} server/server.c -o server/server.proto ${CFLAGS} ${LDFLAGS} -lsm
@echo "LDCC client.proto"
@${CC} client/client.c -o client/client.proto ${CFLAGS} ${LDFLAGS} -lsm
@echo "LDCC tools_dDat"
@${CC} ${OBJS} src/tools_dDat.c -o tools_dDat ${LDFLAGS} ${CFLAGS}
@echo "LDCC tools_wfDat"
@${CC} ${OBJS} src/tools_wfDat.c -o tools_wfDat ${LDFLAGS} ${CFLAGS}
@echo "LDCC tools_dfDat"
@${CC} ${OBJS} src/tools_dfDat.c -o tools_dfDat ${LDFLAGS} ${CFLAGS}
@echo "LDCC tools_wDat"
@${CC} ${OBJS} src/tools_wDat.c -o tools_wDat ${LDFLAGS} ${CFLAGS}
@echo "LDCC dev_dump_fDat"
@${CC} ${OBJS} src/dump_fDat.c -o dev_dump_fDat ${LDFLAGS} ${CFLAGS}
@echo "LDCC dev_send_txt"
@${CC} ${OBJS} src/dev_send_txt.c -o dev_send_txt ${LDFLAGS} ${CFLAGS}
@echo "LDCC client_txt_generic"
@${CC} ${LDFLAGS} ${CFLAGS} -o client_txt_generic src/client_txt_generic.c -lsm
@echo "LDCC dump_serverconf"
@${CC} ${LDFLAGS} ${CFLAGS} -o dump_serverconf debug/dump_serverconf.c ${OBJS}
@echo "TEST tests"
@make -C tests tests
install:
@echo "INSTALL libsm.so"
@install libsm.so ${PREFIX}/lib
@echo "INSTALL libsm.a"
@install libsm.a ${PREFIX}/lib
clean:
@echo "CLEAN"
@rm -f obj/*.o dev_send_txt dev_dump_fDat tools_wDat libsm.a libsm.so client_txt_generic tools_dfDat tools_wfDat tools_dDat libsm.a libsm.so libsm.so.1 server/server.proto client/client.proto tests/opensm-libio-test-txt tests/opensm-libio-test-file