File: Makefile

package info (click to toggle)
openssn 1.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 7,340 kB
  • sloc: cpp: 10,973; makefile: 80
file content (69 lines) | stat: -rw-r--r-- 1,806 bytes parent folder | download | duplicates (2)
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
59
60
61
62
63
64
65
66
67
68
69
PREFIX ?= /usr
SSN = openssn
DATADIR = $(PREFIX)/share/games/openssn
OPTDIR = /opt/openssn
VERSION = 1.4

all:
	$(MAKE) VERSION=$(VERSION) PREFIX=$(PREFIX) OPTDIR=$(OPTDIR) DATADIR=$(DATADIR) -C src
	gzip -c openssn.6 > openssn.6.gz

clean:
	rm -f src/*.o $(SSN)
	rm -f openssn.6.gz

windows:
	$(MAKE) -C src -f Makefile.windows

install: all
	mkdir -p $(PREFIX)/bin
	mkdir -p $(DATADIR)/data
	mkdir -p $(DATADIR)/images
	mkdir -p $(DATADIR)/ships
	mkdir -p $(DATADIR)/sounds
	mkdir -p $(PREFIX)/share/pixmaps
	mkdir -p $(PREFIX)/share/applications
	mkdir -p $(PREFIX)/share/man/man6/
	cp $(SSN) $(PREFIX)/bin/
	cp images/* $(DATADIR)/images
	cp data/* $(DATADIR)/data
	cp ships/* $(DATADIR)/ships
	cp sounds/* $(DATADIR)/sounds
	cp openssn.png $(PREFIX)/share/pixmaps
	cp openssn.desktop $(PREFIX)/share/applications
	cp openssn.6.gz $(PREFIX)/share/man/man6

optinstall: all
	mkdir -p $(OPTDIR)
	mkdir -p $(OPTDIR)/data
	mkdir -p $(OPTDIR)/images
	mkdir -p $(OPTDIR)/ships
	mkdir -p $(OPTDIR)/sounds
	mkdir -p $(PREFIX)/share/applications
	mkdir -p $(PREFIX)/share/pixmaps
	cp $(SSN) $(OPTDIR)
	cp images/* $(OPTDIR)/images
	cp data/* $(OPTDIR)/data
	cp ships/* $(OPTDIR)/ships
	cp sounds/* $(OPTDIR)/sounds
	cp openssn.desktop $(PREFIX)/share/applications/
	cp openssn.png $(PREFIX)/share/pixmaps/

deinstall:
	rm -rf $(PREFIX)/bin/$(SSN)
	rm -rf $(DATADIR)
	rm -rf $(PREFIX)/share/man/man6/openssn.6.gz
	rm -f $(PREFIX)/share/applications/openssn.desktop
	rm -f $(PREFIX)/share/pixmaps/openssn.png

optdeinstall:
	rm -rf $(OPTDIR)
	rm -rf $(PREFIX)/share/applications/openssn.desktop
	rm -rf $(PREFIX)/share/pixmaps/openssn.png

tarball: clean
	cd .. && tar czf openssn-$(VERSION).tar.gz openssn --exclude=.svn

zipfile: clean
	cd .. && zip -r openssn-$(VERSION)-source.zip openssn --exclude \*.svn\*