File: Makefile

package info (click to toggle)
nighthawk 1.0-9
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,420 kB
  • ctags: 18,064
  • sloc: fortran: 17,597; cpp: 4,948; makefile: 87; sh: 13
file content (89 lines) | stat: -rw-r--r-- 2,221 bytes parent folder | download | duplicates (4)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
############################################################################
# NightHawk - By Jason Nunn(JsNO) - Sept 1996
#
############################################################################

#INSTALL_DIR     = .
PREFIX           = debian/tmp
INSTALL_DIR      = /usr/games
INSTALL_LIB_DIR  = /usr/lib/games/nighthawk
SCORES           = /var/lib/games/nighthawk.scores

############################################################################
VERSION         = 1.0
CC		= g++
OPTIONS 	= -Wall -O2 -pipe \
                        -DINSTALL_DIR='"$(INSTALL_DIR)"' \
                        -DINSTALL_LIB_DIR='"$(INSTALL_LIB_DIR)"' \
                        -DSCORES='"$(SCORES)"' \
			-DVERSION='"$(VERSION)"'

INCLUDE		=
LIBS		= -L/usr/X11R6/lib -lXpm -lX11
EVERYTHING	= $(OPTIONS) $(INCLUDE) $(LIBS)

###############################
all: nighthawk

tools: ned xpm_view

###############################
install:
	make all
	install -d $(PREFIX)$(INSTALL_LIB_DIR) $(PREFIX)$(INSTALL_DIR)
	install -o root -g games -m2755 nighthawk $(PREFIX)$(INSTALL_DIR)/nighthawk
	cp -R nighthawk_data/* $(PREFIX)$(INSTALL_LIB_DIR)
	make clean

uninstall:
	rm -rf  $(PREFIX)

###############################
OBJE		= misc.o floor.o object.o ned.o

ned: $(OBJE)
	$(CC) $(OBJE) $(EVERYTHING) -o ned
	strip ned

###############################
OBJV		= misc.o floor.o object.o xpm_view.o

xpm_view: $(OBJV)
	$(CC) $(OBJV) $(EVERYTHING) -o xpm_view
	strip xpm_view

###############################
OBJ		= misc.o floor.o object.o ship.o nighthawk.o

nighthawk: $(OBJ)
	$(CC) $(OBJ) $(EVERYTHING) -o nighthawk
	strip nighthawk

###############################
clean:
	rm -f *.o ned xpm_view nighthawk core

###############################

INCLUDE_FILES	= *.h

misc.o: misc.cc $(INCLUDE_FILES)
	$(CC) $(OPTIONS) -c misc.cc

floor.o: floor.cc $(INCLUDE_FILES)
	$(CC) $(OPTIONS) -c floor.cc

object.o: object.cc $(INCLUDE_FILES)
	$(CC) $(OPTIONS) -c object.cc

ship.o: ship.cc $(INCLUDE_FILES)
	$(CC) $(OPTIONS) -c ship.cc

ned.o: ned.cc $(INCLUDE_FILES)
	$(CC) $(OPTIONS) -c ned.cc

xpm_view.o: xpm_view.cc $(INCLUDE_FILES)
	$(CC) $(OPTIONS) -c xpm_view.cc

nighthawk.o: nighthawk.cc $(INCLUDE_FILES)
	$(CC) $(OPTIONS) -c nighthawk.cc