-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.user
43 lines (33 loc) · 1.35 KB
/
Makefile.user
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
# Separate Makefile because kernel whinges if we redefine things like CFLAGS
include $(PWD)/Unbuckle.makeopts
USR-C = src/user/unbuckle_user.o
USR-C += src/buckets_user.o
USR-C += src/core_user.o
USR-C += src/user/entry_user.o
USR-C += src/net/udpserver_user.o
USR-C += src/prot/memcached_user.o
USR-C += src/user/db/hashtable_user.o
USR-C += src/user/net/udpserver_user.o
USR-C += src/user/process_user.o
CHASTE-C = src/user/db/libchaste/data_structs/linked_list/linked_list_user.o
CHASTE-C += src/user/db/libchaste/data_structs/linked_list/linked_list_std_user.o
CHASTE-C += src/user/db/libchaste/data_structs/hash_map/hash_map_user.o
CHASTE-C += src/user/db/libchaste/data_structs/array/array_std_user.o
CHASTE-C += src/user/db/libchaste/data_structs/array/array_user.o
CHASTE-C += src/user/db/libchaste/hash_functions/spooky/spooky_hash_user.o
# Userland always uses UThash
UB_C_OPTS += -D HASHTABLE_UTHASH=1
CFLAGS = -Wall -O2 -Wno-pointer-sign $(UB_C_OPTS)
CHFLAGS = -Isrc/ -Isrc/user/db/libchaste/
UBFLAGS = -Isrc/
CC = gcc -c
LINKER = gcc -o
user: $(USR-C)
mkdir -p bin/user
$(LINKER) bin/user/unbuckle $(USR-C)
$(USR-C): src/%_user.o: src/%.c
$(CC) $(CFLAGS) $(UBFLAGS) -o $@ $<
$(CHASTE-C): src/user/db/libchaste/%_user.o: src/user/db/libchaste/%.c
$(CC) $(CFLAGS) $(CHFLAGS) -o $@ $<
user-test: $(UDP-C)
$(CC) -Wall -Isrc/ -o bin/user/udp_tester $(UDP-C)