blob: 68c986ce8fed6bbad8dbce6ea06709a6c451e234 (
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
|
# Debug mode:
# DEBUG = yes
CC = g++
LIB = libtexo.a
CFLAGS = -Wall
ifeq '$(DEBUG)' 'yes'
CFLAGS += -g -O0
else
CFLAGS += -O3
endif
SRC_DIR = src
SRC = $(wildcard $(SRC_DIR)/*.cpp)
OBJ = $(SRC:.cpp=.o)
default: $(LIB)
ifneq "clean" "$(MAKECMDGOALS)"
-include deps.mk
endif
deps.mk: $(SRC)
$(CC) -MM $^ > $@
%.o: %.cpp %.h
$(CC) $(CFLAGS) -c $< -o $@
$(LIB): $(OBJ)
ar rcs $@ $^
clean:
rm -f $(OBJ) $(LIB) deps.mk
|