forked from hejoin/fake86-mirror
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
executable file
·56 lines (47 loc) · 1.42 KB
/
makefile
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
SRCFILES=src/fake86/*.c
BINPATH=/usr/bin
DATAPATH=/usr/share/fake86
CFLAGS=-O2 -DPATH_DATAFILES=\"$(DATAPATH)/\"
INCLUDE=-Isrc/fake86
LIBS=-lpthread -lX11
SDLFLAGS=`sdl-config --cflags --libs`
all: fake86-src imagegen-src
fake86-src: bin/fake86-8086 bin/fake86-80186 bin/fake86-v20
bin/fake86-8086:
$(CC) $(SRCFILES) -o bin/fake86-8086 $(CFLAGS) $(INCLUDE) $(LIBS) $(SDLFLAGS) -DCPU_8086
chmod a+x bin/fake86-8086
bin/fake86-80186:
$(CC) $(SRCFILES) -o bin/fake86-80186 $(CFLAGS) $(INCLUDE) $(LIBS) $(SDLFLAGS) -DCPU_80186
chmod a+x bin/fake86-80186
bin/fake86-v20:
$(CC) $(SRCFILES) -o bin/fake86-v20 $(CFLAGS) $(INCLUDE) $(LIBS) $(SDLFLAGS) -DCPU_V20
chmod a+x bin/fake86-v20
imagegen-src:
$(CC) src/imagegen/imagegen.c -o bin/imagegen $(CFLAGS)
chmod a+x bin/imagegen
install:
mkdir -p $(BINPATH)
mkdir -p $(DATAPATH)
chmod a-x data/*
cp -p bin/fake86-8086 $(BINPATH)
cp -p bin/fake86-80186 $(BINPATH)
cp -p bin/fake86-v20 $(BINPATH)
cp -p bin/imagegen $(BINPATH)
cp -p data/asciivga.dat $(DATAPATH)
cp -p data/pcxtbios.bin $(DATAPATH)
cp -p data/videorom.bin $(DATAPATH)
cp -p data/rombasic.bin $(DATAPATH)
clean:
rm -f src/fake86/*.o
rm -f src/fake86/*~
rm -f src/imagegen/*.o
rm -f src/imagegen/*~
rm -f bin/fake86-8086
rm -f bin/fake86-80186
rm -f bin/fake86-v20
rm -f bin/imagegen
uninstall:
rm -f $(BINPATH)/fake86-8086
rm -f $(BINPATH)/fake86-80186
rm -f $(BINPATH)/fake86-v20
rm -f $(BINPATH)/imagegen