Makefile 1.26 KB
Newer Older
1
ifdef PREFIX
2
	PREFIX2B=$(PREFIX)
3
else
4
	PREFIX2B=/usr/local
5
endif
6

7 8 9 10 11 12 13
ifdef DESTDIR
	PREFIX2=$(DESTDIR)/$(PREFIX2B)
else
	PREFIX2=$(PREFIX2B)
endif


Sergio Costas's avatar
Sergio Costas committed
14 15
all:
	cd src && $(MAKE)
Sergio Costas's avatar
Sergio Costas committed
16 17

clean:
18
	rm -f src/fbzx src/*.o src/*~ src/z80free/*.o
Sergio Costas's avatar
Sergio Costas committed
19 20

install:
21
	rm -f $(PREFIX2)/bin/fbzx
22
	mkdir -p $(PREFIX2)/bin
23 24 25 26
	mkdir -p $(PREFIX2)/share/fbzx
	mkdir -p $(PREFIX2)/share/applications
	mkdir -p $(PREFIX2)/share/pixmaps
	mkdir -p $(PREFIX2)/share/doc/fbzx
Sergio Costas's avatar
Sergio Costas committed
27
	mkdir -p $(PREFIX2)/share/appdata
28
	cp src/fbzx $(PREFIX2)/bin
Sergio Costas's avatar
Sergio Costas committed
29 30 31
	cp data/keymap.bmp $(PREFIX2)/share/fbzx
	cp data/fbzx.desktop $(PREFIX2)/share/applications
	cp data/fbzx.svg $(PREFIX2)/share/pixmaps
32
	cp AMSTRAD CAPABILITIES COPYING FAQ README README.TZX VERSIONS.md $(PREFIX2)/share/doc/fbzx/
33
	cp fbzx.appdata.xml $(PREFIX2)/share/appdata/
34 35
	chmod 644 $(PREFIX2)/share/fbzx/*
	chmod 644 $(PREFIX2)/share/doc/fbzx/*
36 37 38 39 40
ifndef NOROMS
	mkdir -p $(PREFIX2)/share/spectrum-roms
	cp data/spectrum-roms/* $(PREFIX2)/share/spectrum-roms
	chmod 644 $(PREFIX2)/share/spectrum-roms/*
endif
Sergio Costas's avatar
Sergio Costas committed
41 42

uninstall:
43 44 45 46 47 48
	rm -f $(PREFIX2)/bin/fbzx
	rm -rf $(PREFIX2)/share/fbzx
	rm -f $(PREFIX2)/share/applications/fbzx.desktop
	rm -f $(PREFIX2)/share/pixmaps/fbzx.svg
	rm -rf $(PREFIX2)/share/doc/fbzx
	rm -rf $(PREFIX2)/share/spectrum-roms
49
	rm -f $(PREFIX2)/share/appdata/fbzx.appdata.xml