-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 683 Bytes
/
Makefile
File metadata and controls
35 lines (26 loc) · 683 Bytes
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
CXX= g++
CC= gcc
CFLAGS= -fPIC -g -Wall -DDEBUG -DTIMING -O0 -D_GNU_SOURCE -pthread -Wno-deprecated -Werror
LINK= -L./
INCLUDE= -I./
RUN = -Wl,-rpath,./
SRC = xl_util.c \
xl_stack.c \
xl_bst.c \
xl_rbt.c \
xl_visual.c
all: test_bst test_rbt
#all: stack
test_bst: $(SRC:.c=.o) test_bst.c
$(CC) -o $@ $^ $(CFLAGS) $(INCLUDE) $(LINK) $(RUN)
test_rbt: $(SRC:.c=.o) test_rbt.c
$(CC) -o $@ $^ $(CFLAGS) $(INCLUDE) $(LINK) $(RUN)
%.o: %.cpp Makefile
$(CXX) $(CFLAGS) $(INCLUDE) -c -o $@ $<
%.o: %.c Makefile
$(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $<
%.o: %.cc Makefile
$(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $<
clean:
rm -f $(SRC:.c=.o) test_bst test_rbt
install: