-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile.linux
82 lines (67 loc) · 2.09 KB
/
Makefile.linux
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#
# MSX port on RS-97
#
# by pingflood; 2018
#
#CHAINPREFIX := /opt/rs97-toolchain
#CROSS_COMPILE := $(CHAINPREFIX)/usr/bin/mipsel-linux-
CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
STRIP = $(CROSS_COMPILE)strip
SYSROOT := $(shell $(CC) --print-sysroot)
MSX_VERSION=1.1.0
TARGET = ./dingux-msx/dingux-msx.dge
SDL_CONFIG = $(SYSROOT)/usr/bin/sdl-config
OBJS = ./src/gp2x_psp.o \
./src/cpudingux.o \
./src/fMSX.o ./src/MSX.o ./src/Patch.o ./src/Sound.o ./src/Disk.o \
./src/Z80.o ./src/I8255.o ./src/AY8910.o ./src/YM2413.o ./src/SCC.o ./src/V9938.o ./src/I8251.o \
./src/SDLgfx.o ./src/SDLsnd.o ./src/SDLfilter.o \
./src/emu2413.o ./src/emu2212.o ./src/emu2149.o \
./src/fmopl.o ./src/ymdeltat.o \
./src/psp_main.o \
./src/psp_sdl.o \
./src/psp_kbd.o \
./src/psp_font.o \
./src/psp_menu.o \
./src/psp_joy.o \
./src/psp_danzeff.o \
./src/psp_menu_set.o \
./src/psp_menu_help.o \
./src/psp_menu_joy.o \
./src/psp_menu_kbd.o \
./src/psp_menu_cheat.o \
./src/psp_menu_list.o \
./src/psp_editor.o \
./src/unzip.o \
./src/ioapi.o \
./src/sha1.o \
./src/psp_fmgr.o
DEFAULT_CFLAGS = $(shell $(SDL_CONFIG) --cflags)
MORE_CFLAGS = -DFMSX -DUNIX -DNARROW -DSOUND -DBPP16 -DSDL -DLSB_FIRST -std=gnu11
MORE_CFLAGS += -I. -I$(CHAINPREFIX)/usr/include/
#MORE_CFLAGS += -DMPU_JZ4740 -mips32 -G0
MORE_CFLAGS += -O3 -fsigned-char -ffast-math -fomit-frame-pointer -fno-strength-reduce
#MORE_CFLAGS += -DDINGUX_MODE
MORE_CFLAGS += -DLINUX_MODE
MORE_CFLAGS += -DNO_STDIO_REDIRECT
MORE_CFLAGS += -DMSX_VERSION=\"$(MSX_VERSION)\"
MORE_CFLAGS += -O2 -fomit-frame-pointer -ffunction-sections -ffast-math -fsingle-precision-constant
LDFLAGS = -s -lm -lz `$(SDL_CONFIG) --libs`
LDFLAGS += -Wl,--gc-sections
LIBS += -lSDL_image -lpng
LIBS += -lpthread -ldl
LIBS += -B$(SYSROOT)/usr/lib
#LIBS += -R$(SYSROOT)/usr/lib
LIBS += -L$(SYSROOT)/usr/lib
CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
.c.o:
$(CC) $(CFLAGS) -c $< -o $@
$(TARGET): $(OBJS)
$(CC) $(LDFLAGS) $(CFLAGS) $(OBJS) $(LIBS) -o $(TARGET) && $(STRIP) $(TARGET)
#install: $(TARGET)
# cp $< /media/dingux/local/emulators/dingux-msx/
clean:
rm -f $(OBJS) $(TARGET)
ctags:
ctags *[ch]