-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
34 lines (25 loc) · 920 Bytes
/
makefile
File metadata and controls
34 lines (25 loc) · 920 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
# makefile for DoGoBoy
#
# Excuse the rubbish makefile, it aims to be cross platform but isn't very well put
# together as I haven't had much time to work on it.
CC = gcc
# Kludge to override paths in environments where sdl-config doesn't work (like Windows)
SDL_PATH := ../SDL-1.2.15/
SDL_INC_PATH := $(SDL_PATH)include/SDL
SDL_LIB_PATH := $(SDL_PATH)lib
CCFLAGS = -I$(SDL_INC_PATH) $(shell sdl-config --cflags) -Wall -D_GNU_SOURCE=1 -Dmain=SDL_main -O3
LDFLAGS = -L$(SDL_LIB_PATH) $(shell sdl-config --libs)
# Cygwin specific flag
ifeq ($(shell uname -o),Cygwin)
CCFLAGS += -mno-cygwin -mconsole
endif
TARGET = DoGoBoy
SOURCES = src/main.c src/sharp_LR35902.c src/memory.c src/graphics.c
INCLUDES = -Iinclude
LIBRARIES = \
-lSDLmain \
-lSDL
all:
@echo "Compiling, go go DoGoBoy..."
@$(CC) $(SOURCES) $(CCFLAGS) $(INCLUDES) $(LDFLAGS) $(LIBRARIES) -o $(TARGET)
@echo "Done."