blob: 02431a7290a6f7affd9432bec63d8cb1b0712093 (
plain)
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
|
RM_F = rm -f
ADDITIONAL_CFLAGS =
CFLAGS = -std=c99 -Wall -pedantic -ggdb -g -DUSE_TERMIOS $(ADDITIONAL_CFLAGS)
LIBTOOL = libtool
LDFLAGS = -lc
CC = clang
LIB_PREFIX = lib
LIB_SUFFIX = .dylib
mulklib_C_SOURCES = bitmapped_patricia_tree.c
mulklib_OBJECTS = $(patsubst %.c,%.o,$(mulklib_C_SOURCES))
mulklib_TARGET = $(LIB_PREFIX)mulklib$(LIB_SUFFIX)
bpttest_C_SOURCES = bpt_test.c
bpttest_OBJECTS = $(patsubst %.c,%.o,$(bpttest_C_SOURCES))
bpttest_TARGET = bpt_test
config_C_SOURCES = config.c
config_OBJECTS = $(patsubst %.c,%.o,$(config_C_SOURCES))
config_TARGET = config
.PHONY: all clean cleanconfig
all: $(mulklib_TARGET) $(bpttest_TARGET)
clean:
$(RM_F) $(mulklib_OBJECTS)
$(RM_F) $(mulklib_TARGET)
$(RM_F) $(bpttest_OBJECTS)
$(RM_F) $(bpttest_TARGET)
$(RM_F) $(config_OBJECTS)
$(RM_F) $(config_TARGET)
cleanconfig:
$(RM_F) $(config_OBJECTS)
$(RM_F) $(config_TARGET)
$(mulklib_TARGET): $(mulklib_OBJECTS)
$(LIBTOOL) -dynamic $(LDFLAGS) -o $@ $(mulklib_OBJECTS)
$(bpttest_TARGET): $(bpttest_OBJECTS) $(mulklib_TARGET)
$(CC) -o $@ $+
$(config_TARGET): $(config_OBJECTS)
$(CC) -o $@ $+
bitmapped_patricia_tree.o: bitmapped_patricia_tree.c bitmapped_patricia_tree.h
bpt_test.o: bpt_test.c bitmapped_patricia_tree.h
config.o: config.c
|