-
Notifications
You must be signed in to change notification settings - Fork 34
/
Makefile
34 lines (24 loc) · 1.05 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
CC = gcc
CFLAGS = -Wall -Wextra
DEPSRC = DLL/dll.c Mac-List/mac-list.c Routing-Table/routing-table.c Sync/sync.c
.PHONY: dll mac-list routing-table sync shm_ip
default: dll mac-list routing-table sync shm_ip
$(CC) $(CFLAGS) client.c shm_ip.c $(DEPSRC) -o client -lrt
$(CC) $(CFLAGS) server.c shm_ip.c $(DEPSRC) -o server -lrt
client: dll mac-list routing-table sync shm_ip
$(CC) $(CFLAGS) client.c shm_ip.c $(DEPSRC) -o client -lrt
server: dll mac-list routing-table sync shm_ip
$(CC) $(CFLAGS) server.c shm_ip.c $(DEPSRC) -o server -lrt
dll:
$(CC) $(CFLAGS) -c DLL/dll.c -o DLL/dll.o
# $(CC) $(CFLAGS) DLL/main.c DLL/dll.c -o DLL/main
mac-list: dll shm_ip
$(CC) $(CFLAGS) -c Mac-List/mac-list.c -o Mac-List/mac-list.o
routing-table: dll
$(CC) $(CFLAGS) -c Routing-Table/routing-table.c -o Routing-Table/routing-table.o
sync: dll mac-list routing-table shm_ip
$(CC) $(CFLAGS) -c Sync/sync.c -o Sync/sync.o
shm_ip:
$(CC) $(CFLAGS) -c shm_ip.c -o shm_ip.o
clean:
rm -f client server DLL/dll.o Mac-List/mac-list.o Routing-Table/routing-table.o shm_ip.o