-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.SDL
58 lines (45 loc) · 1.55 KB
/
Makefile.SDL
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
#### Makefile for ADAMEm SDL
# Following #defines can be used:
# DEBUG Compile with builtin debugger
# LSB_FIRST Compile for a low-endian machine
# SOUND Compile with sound support
# ZLIB Compile ZLIB version
# SDL Use the SDL library
# IDEHD Include IDE disk support
CC = $(CROSS_COMPILE)gcc # C compiler used
LD = $(CROSS_COMPILE)gcc # Linker used
AS = $(CROSS_COMPILE)gcc # Assembler used
CFLAGS = -Wall -Wformat=0 -O2 -fomit-frame-pointer -IIDE \
-DLSB_FIRST -DSDL -DDEBUG -DSOUND -DSOUND_PSG -DIDEHD -I/usr/include/SDL2
ASFLAGS = -Wall -c
OBJECTS = ADAMEm.o Coleco.o Z80.o AdamemSDL.o AdamSDLSound_2.o Sound.o Z80Debug.o Bitmap.o HarddiskIDE.o sms_ntsc.o
all: adamem cvem keys z80dasm snapedit
adamem: $(OBJECTS)
$(LD) -s -o adamem $(OBJECTS) -lz `sdl2-config --static-libs` -lm
cvem: adamem
rm -f cvem
ln -s adamem cvem
keys.o: keys.c
keys: keys.o
$(LD) -s -o keys keys.o
adamem.snd: makedata
makedata
makedata.o: makedata.c
makedata: makedata.o
$(LD) -s -o makedata makedata.o -lz
z80dasm.o: z80dasm.c z80dasm.h
z80dasm: z80dasm.o
$(LD) -s -o z80dasm z80dasm.o -lz
snapedit.o: snapedit.c
snapedit: snapedit.o
$(LD) -s -o snapedit snapedit.o -lz
ADAMEm.o: ADAMEm.c Coleco.h Z80.h Help.h Z80IO.h
Coleco.o: Coleco.c Coleco.h Z80.h Z80IO.h
Bitmap.o: Bitmap.c Bitmap.h
Z80Debug.o: Z80Debug.c Z80.h Z80IO.h z80dasm.h
Z80.o: Z80.c Z80.h Z80CDx86.h Z80IO.h Z80DAA.h
SDL.o: AdamemSDL.c AdamSDLSound_2.c
Sound.o: Sound.c Coleco.h Sound.h
HarddiskIDE.o:
$(CC) $(CFLAGS) -c IDE/HarddiskIDE.c
sms_ntsc.o: sms_ntsc.c