Makefile 3.73 KB
Newer Older
1 2 3 4 5
#CC = gcc -O2 -Wall -Wno-pointer-sign `pkg-config --cflags sdl libpulse-simple alsa` -D D_SOUND_PULSE -D D_SOUND_ALSA -D D_SOUND_OSS
#CCo = gcc

CFLAGS += `pkg-config --cflags sdl libpulse-simple alsa` -O2 -Wno-pointer-sign -Wall -D D_SOUND_PULSE -D D_SOUND_ALSA -D D_SOUND_OSS
LDFLAGS += `pkg-config --libs sdl libpulse-simple alsa`
Sergio Costas's avatar
Sergio Costas committed
6 7 8

fbzx: computer.o Z80free.o Z80free_codes.o Z80free_codesCB.o Z80free_codesED.o Z80free_codesDD.o Z80free_codesFD.o Z80free_codesDDCB.o Z80free_codesFDCB.o emulator.o cargador.o characters.o menus.o sound.o tape.o spk_ay.o microdrive.o

Sergio Costas's avatar
Sergio Costas committed
9
	$(CC) -o fbzx computer.o Z80free.o Z80free_codes.o Z80free_codesCB.o Z80free_codesED.o Z80free_codesDD.o Z80free_codesFD.o Z80free_codesDDCB.o Z80free_codesFDCB.o emulator.o cargador.o characters.o menus.o sound.o tape.o spk_ay.o microdrive.o $(LDFLAGS)
Sergio Costas's avatar
Sergio Costas committed
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

clean:
	rm fbzx *.o *~

install:
	rm -f /usr/bin/fbzx
	cp fbzx /usr/local/bin
	mkdir -p /usr/local/share/fbzx
	mkdir -p /usr/local/share/spectrum-roms
	mkdir -p /usr/share/applications
	mkdir -p /usr/share/pixmaps
	mkdir -p /usr/local/share/doc/fbzx
	cp spectrum-roms/* /usr/local/share/spectrum-roms
	cp keymap.bmp /usr/local/share/fbzx
	cp fbzx.desktop /usr/share/applications
	cp fbzx.svg /usr/share/pixmaps
	cp AMSTRAD CAPABILITIES COPYING FAQ README README.TZX VERSIONS /usr/local/share/doc/fbzx/

uninstall:
	rm -f /usr/local/bin/fbzx
	rm -rf /usr/local/share/fbzx
	rm -f /usr/share/applications/fbzx.desktop
	rm -f /usr/share/pixmaps/fbzx.svg
	rm -rf /usr/local/share/doc/fbzx
	rm -rf /usr/local/share/spectrum-roms

spk_ay.o: spk_ay.c spk_ay.h emulator.h sound.h computer.h z80free/Z80free.h
37
	$(CC) $(CFLAGS) -c -o spk_ay.o spk_ay.c
Sergio Costas's avatar
Sergio Costas committed
38 39

microdrive.o: microdrive.c microdrive.h z80free/Z80free.h computer.h emulator.h z80free/Z80free.h
40
	$(CC) $(CFLAGS) -c -o microdrive.o microdrive.c
Sergio Costas's avatar
Sergio Costas committed
41 42

sound.o: sound.c sound.h computer.h emulator.h z80free/Z80free.h
43
	$(CC) $(CFLAGS) -c -o sound.o sound.c
Sergio Costas's avatar
Sergio Costas committed
44 45

emulator.o: emulator.c z80free/Z80free.h computer.h emulator.h characters.h menus.h cargador.h sound.h tape.h microdrive.h
46
	$(CC) $(CFLAGS) -c -o emulator.o emulator.c
Sergio Costas's avatar
Sergio Costas committed
47 48

computer.o: computer.c z80free/Z80free.h computer.h emulator.h characters.h menus.h cargador.h sound.h tape.h spk_ay.h microdrive.h
49
	$(CC) $(CFLAGS) -c -o computer.o computer.c
Sergio Costas's avatar
Sergio Costas committed
50 51

tape.o: tape.c z80free/Z80free.h computer.h emulator.h menus.h tape.h computer.h
52
	$(CC) $(CFLAGS) -c -o tape.o tape.c
Sergio Costas's avatar
Sergio Costas committed
53 54

cargador.o: cargador.c cargador.h computer.h emulator.h z80free/Z80free.h characters.h menus.h computer.h
55
	$(CC) $(CFLAGS) -c -o cargador.o cargador.c
Sergio Costas's avatar
Sergio Costas committed
56 57

characters.o: characters.c characters.h emulator.h computer.h
58
	$(CC) $(CFLAGS) -c -o characters.o characters.c
Sergio Costas's avatar
Sergio Costas committed
59 60

menus.o: menus.c menus.h characters.h computer.h emulator.h z80free/Z80free.h cargador.h tape.h
61
	$(CC) $(CFLAGS) -c -o menus.o menus.c
Sergio Costas's avatar
Sergio Costas committed
62 63

Z80free.o: z80free/Z80free.c z80free/Z80free.h
64
	$(CC) $(CFLAGS) -c -o Z80free.o z80free/Z80free.c
Sergio Costas's avatar
Sergio Costas committed
65 66

Z80free_codes.o: z80free/Z80free_codes.c z80free/Z80free.h
67
	$(CC) $(CFLAGS) -c -o Z80free_codes.o z80free/Z80free_codes.c
Sergio Costas's avatar
Sergio Costas committed
68 69
	
Z80free_codesCB.o: z80free/Z80free_codesCB.c z80free/Z80free.h
70
	$(CC) $(CFLAGS) -c -o Z80free_codesCB.o z80free/Z80free_codesCB.c
Sergio Costas's avatar
Sergio Costas committed
71 72

Z80free_codesED.o: z80free/Z80free_codesED.c z80free/Z80free.h
73
	$(CC) $(CFLAGS) -c -o Z80free_codesED.o z80free/Z80free_codesED.c
Sergio Costas's avatar
Sergio Costas committed
74 75
	
Z80free_codesDD.o: z80free/Z80free_codesDD.c z80free/Z80free.h
76
	$(CC) $(CFLAGS) -c -o Z80free_codesDD.o z80free/Z80free_codesDD.c
Sergio Costas's avatar
Sergio Costas committed
77 78
	
Z80free_codesFD.o: z80free/Z80free_codesFD.c z80free/Z80free.h
79
	$(CC) $(CFLAGS) -c -o Z80free_codesFD.o z80free/Z80free_codesFD.c
Sergio Costas's avatar
Sergio Costas committed
80 81

Z80free_codesDDCB.o: z80free/Z80free_codesDDCB.c z80free/Z80free.h
82
	$(CC) $(CFLAGS) -c -o Z80free_codesDDCB.o z80free/Z80free_codesDDCB.c
Sergio Costas's avatar
Sergio Costas committed
83 84
	
Z80free_codesFDCB.o: z80free/Z80free_codesFDCB.c z80free/Z80free.h
85
	$(CC) $(CFLAGS) -c -o Z80free_codesFDCB.o z80free/Z80free_codesFDCB.c
Sergio Costas's avatar
Sergio Costas committed
86