blob: 42d14aa53cb6bf776ee132831e6309e1cd033514 (
plain)
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
|
# compiler used to build graftest. theoretically this could
# be a cross-compiler.
CC=gcc
CFLAGS=-Wall -O2
# compiler used to build blob2c. this needs to be the native
# compiler even if CC is cross.
HOSTCC=gcc
HOSTCFLAGS=-Wall -O2
all: rom.o colortable.o
gcc -O2 -Wall -o graftest graftest.c rom.o colortable.o `pkg-config sdl2 --cflags --libs`
rom.c: blob2c jumpmanjr.rom
./blob2c jumpmanjr.rom > rom.c 2> rom.h
blob2c: blob2c.c
$(HOSTCC) $(HOSTCFLAGS) -o blob2c blob2c.c
jumpmanjr.rom:
ln -s ../jumpmanjr.rom .
test: all
./graftest
clean:
rm -f *.o graftest core blob2c jumpmanjr.rom rom.h rom.c
|