-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 673 Bytes
/
Makefile
File metadata and controls
39 lines (29 loc) · 673 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
# compiler
CC=gcc
# linker
LD=gcc
# optimisation
OPT=-O2
# warnings
WARN=-Wall -Wextra
# standards
STD=-ansi -pedantic
# pthread
PTHREAD=-pthread
CCFLAGS = $(DEBUG) $(WARN) $(PTHREAD) $(STD) $(OPT) -pipe `pkg-config --cflags openal SPTK gtk+-3.0`
LDFLAGS = $(PTHREAD) -export-dynamic `pkg-config --libs openal SPTK gtk+-3.0`
SRCS = $(wildcard *.c) $(wildcard ./*/*.c)
OBJECTS = $(patsubst %.c, %.o, $(SRCS))
TARGET = September
.PHONY: default all clean
default: $(TARGET)
all: default
%.o: %.c
$(CC) $(CCFLAGS) -c $< -o $@
.PRECIOUS: $(TARGET) $(OBJECTS)
$(TARGET): $(OBJECTS)
$(LD) $(OBJECTS) $(LDFLAGS) -o $@
clean:
$(RM) *.o
$(RM) ./*/*.o
$(RM) $(TARGET)