-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile.test
34 lines (25 loc) · 846 Bytes
/
makefile.test
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
OPT = -g0 -O3
LIB_SOURCES1 = test.c
LIB_SOURCES = $(addprefix src/, $(LIB_SOURCES1))
CC = gcc
TARGET = awsm-test
LIB_OBJECTS =$(LIB_SOURCES:.c=.o)
LDFLAGS= -L. $(OPT) -Wall -Wextra
LIBS= -lm -lawsm
ALL= $(TARGET)
CFLAGS = -Isrc/ -Iinclude/ -std=gnu11 -c $(OPT) -Wall -Wextra -Werror=implicit-function-declaration -Wformat=0 -D_GNU_SOURCE -Wwrite-strings -Werror -Werror=maybe-uninitialized #-fprofile-use=profile.out -v -fprofile-generate=./profile.out #
ifneq ($(BUILD),release)
CFLAGS += -DDEBUG
OPT = -g3 -O0
endif
$(TARGET): $(LIB_OBJECTS)
$(CC) $(LDFLAGS) $(LIB_OBJECTS) $(LIBS) -o $@
release debug:
$(MAKE) BUILD=$@
all: $(ALL)
.c.o: $(HEADERS) $(LEVEL_CS)
$(CC) $(CFLAGS) $< -o $@ -MMD -MF [email protected]
depend: h-depend
clean:
rm -f $(LIB_OBJECTS) $(ALL) src/*.o.depends src/*.o
-include $(LIB_OBJECTS:.o=.o.depends)