-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·48 lines (33 loc) · 815 Bytes
/
Makefile
File metadata and controls
executable file
·48 lines (33 loc) · 815 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
36
37
38
39
40
41
42
43
44
45
46
47
48
include config.mk
vpath %.h inc/
vpath %.c src/
vpath %.c test/
INC += -I ./
INC += -I inc/
OBJ := error.o set.o relation.o tools.o text_io.o
TEST_OBJ := cu_main.o test_set.o test_relation.o test_tools.o test_text_io.o
.PHONY : all clean
.PHONY : test
.PHONY : doc
TARGET = librelafix
TEST_TARGET = cu_test_$(TARGET)
.SUFFIXES:
all : shared static
shared : $(OBJ)
$(CC) $(CFLAGS) -shared -Wl,-soname,$(TARGET).so.2 -o $(TARGET).so.2.0.0 $^
static : $(OBJ)
ar rcs $(TARGET).a $^
%.o : %.c %.h
$(CC) $(CFLAGS) -c $(INC) -o $@ $<
doc :
$(DOXYGEN)
test : $(TEST_OBJ) $(OBJ)
$(CC) $(CFLAGS) -o $(TEST_TARGET) $^ $(LIBPATH) -lcunit
$(TEST_OBJ) : %.o : %.c
$(CC) $(CFLAGS) -c $(INC) -o $@ $<
clean :
rm -f $(OBJ)
rm -f $(TEST_OBJ)
rm -f $(TARGET).so.* $(TARGET).a
rm -f $(TEST_TARGET)
rm -rf doc