forked from cbush-old/nes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (45 loc) · 1.13 KB
/
Copy pathMakefile
File metadata and controls
53 lines (45 loc) · 1.13 KB
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
49
50
51
52
53
CC= clang++
CFLAGS= -c -Wall -std=c++14 -Wno-unused-const-variable -Wno-missing-braces -O3
#CFLAGS+= -DDEBUG_CPU
INCLUDE= \
-I. \
-Iinclude \
-I/System/Library/Frameworks/OpenGL.framework/Headers \
-I/usr/local/include/SDL2 \
-I/opt/local/include \
-I/usr/include/GL \
-I/usr/include/SDL2
LDFLAGS= -L/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries -L/opt/local/lib
LIBS= -lSDL2 -lGL -lsamplerate \
`imlib2-config --cflags` `imlib2-config --libs`
SOURCES= \
src/apu.cpp \
src/cpu.cpp \
src/ppu.cpp \
src/rom.cpp \
src/nes.cpp \
src/cpu-map.cpp \
src/cpu-asm.cpp \
src/controller_std.cpp \
src/audio_sdl.cpp \
src/audio_sox_pipe.cpp \
src/video_sdl.cpp \
src/video_tty.cpp \
src/video_autosnapshot.cpp \
src/input_sdl.cpp \
src/input_script.cpp \
src/input_script_recorder.cpp \
src/mappers/sxrom.cpp \
src/mappers/uxrom.cpp \
src/mappers/cnrom.cpp \
src/mappers/mmc3.cpp \
src/image.cpp \
main.cpp
OBJECTS= $(SOURCES:.cpp=.o)
all: nes
nes: $(OBJECTS)
$(CC) $(LDFLAGS) $(LIBS) $(OBJECTS) -o nes
.cpp.o:
$(CC) $(CFLAGS) $(INCLUDE) $< -o $@
clean:
rm -f $(OBJECTS) nes