forked from FIX94/fixGB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (36 loc) · 753 Bytes
/
Makefile
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
TARGET := fixGB
DEBUG = 0
AUDIO_FLOAT = 1
OBJECTS :=
OBJECTS +=alhelpers.o
OBJECTS +=apu.o
OBJECTS +=audio.o
OBJECTS +=cpu.o
OBJECTS +=input.o
OBJECTS +=main.o
OBJECTS +=mbc.o
OBJECTS +=mem.o
OBJECTS +=ppu.o
FLAGS += -Wall -Wextra -msse -mfpmath=sse -ffast-math
FLAGS += -Werror=implicit-function-declaration
DEFINES += -DFREEGLUT_STATIC
INCLUDES += -I.
ifeq ($(AUDIO_FLOAT),1)
FLAGS += -DAUDIO_FLOAT=1
endif
ifeq ($(DEBUG),1)
FLAGS += -O0 -g
else
FLAGS += -O3
LDFLAGS += -s
endif
CFLAGS += $(FLAGS) $(DEFINES) $(INCLUDES)
LDFLAGS += $(CFLAGS) -lglut -lopenal -lGL -lGLU -lm
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(CC) $^ -o $@ $(LDFLAGS)
%.o: %.c
$(CC) -c $< -o $@ $(CFLAGS)
clean:
rm -f $(TARGET) $(OBJECTS)
.PHONY: clean test