-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
55 lines (44 loc) · 1.02 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
52
53
54
55
VPATH = adt core log alg daemon tcpip utils tools
CC = gcc
CC_FLAGS = -pthread -static
private_libs = utils.a tcpip.a core.a log.a daemon.a libds.a alg.a
distclean : clean
rm -rf server client
> /tmp/alexjlz_log
kill 9 `pidof server`
kill 9 `pidof client`
kill 9 `pidof alexjlz`
kill 9 `pidof selinux`
clean :
rm -rf *.o *.a client server alexjlz client.h alexjlz.h update.h
cd adt; make clean
cd alg; make clean
cd tools; make clean
cd weapons; make clean
all:
> /tmp/alexjlz_log
cd tools; make
cd adt; make
cd alg; make
./tools/alexxxd -i update update.h
cd weapons; make
make client
make alexjlz
make server
.PHONY : log
log : /tmp/alexjlz_log
cat /tmp/alexjlz_log
server.o : server.c
server : server.o $(private_libs)
$(CC) $(CC_FLAGS) -o server $^
client.o : client.c
client : client.o $(private_libs)
$(CC) $(CC_FLAGS) -o client $^
alexjlz.o : alexjlz.c
alexjlz : alexjlz.o $(private_libs)
$(CC) $(CC_FLAGS) -o alexjlz $^
%.o : %.c %.h
$(CC) $(CC_FLAGS) -c -o $@ $<
%.a : %.o
ar -rc $@ $<
%:%.sh