File: Makefile.in

package info (click to toggle)
xconq 7.2.2-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 8,296 kB
  • ctags: 9,199
  • sloc: ansic: 107,849; sh: 2,108; perl: 2,057; makefile: 1,177; sed: 161; csh: 50; awk: 49; lisp: 39
file content (143 lines) | stat: -rw-r--r-- 3,026 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Makefile for curses interface to Xconq.
# Copyright (C) 1991-1995, 1997 Stanley T. Shebs.

# Xconq is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

prefix = /usr/games

exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
datadir = $(prefix)/lib/xconqdir
mandir = $(prefix)/man
man6dir = $(mandir)/man6
infodir = $(prefix)/info
docdir = $(datadir)/doc

srcdir = .

krnsrcdir = $(srcdir)/../kernel

GAMEUID = games
GAMEGRP = bin

GAMEPERM = 04755

SHELL = /bin/sh

INSTALL = install -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)

CC = cc

CFLAGS = -g

CURSES_LIB = -lcurses -ltermlib

KERNEL_LIB = ../kernel/libconq.a

LOW_LIB = ../kernel/libconqlow.a

# Host and target-dependent makefile fragments come in here.
####
# End of host and target-dependent makefile fragments.

GAME_H = $(krnsrcdir)/game.h \
	 $(krnsrcdir)/gvar.def \
	 $(krnsrcdir)/utype.def \
	 $(krnsrcdir)/mtype.def \
	 $(krnsrcdir)/ttype.def \
	 $(krnsrcdir)/table.def

UNIT_H = $(krnsrcdir)/unit.h \
	 $(krnsrcdir)/action.def \
	 $(krnsrcdir)/plan.def \
	 $(krnsrcdir)/task.def

ALL_H = $(krnsrcdir)/conq.h \
	$(krnsrcdir)/config.h \
	$(krnsrcdir)/misc.h \
	$(krnsrcdir)/dir.h \
	$(krnsrcdir)/lisp.h \
	$(krnsrcdir)/module.h \
	$(GAME_H) \
	$(krnsrcdir)/player.h \
	$(krnsrcdir)/side.h \
	$(UNIT_H) \
	$(krnsrcdir)/goal.def \
	$(krnsrcdir)/world.h \
	$(krnsrcdir)/score.h \
	$(krnsrcdir)/history.h \
	$(krnsrcdir)/ai.h

C_H = $(srcdir)/cconq.h

OBJS = cconq.o cdraw.o ccmd.o

UNIX_CFLAGS = -DUNIX

# -Dcbreak=crmode

ALL_CFLAGS = $(CFLAGS) $(UNIX_CFLAGS) -I$(srcdir) -I$(krnsrcdir)

.c.o:
	$(CC) -c $(ALL_CFLAGS) $<

all:	cconq cconq.6

# The game itself.

cconq: $(OBJS) $(KERNEL_LIB) $(LOW_LIB)
	rm -f cconq
	$(CC) -o cconq $(ALL_CFLAGS) $(LDFLAGS) $(OBJS) $(KERNEL_LIB) $(LOW_LIB) $(CURSES_LIB) $(EXTRA_LIB) -lm $(NET_EXTRA_LIBS)

$(KERNEL_LIB):
	(cd ../kernel; make libconq.a)

$(LOW_LIB):
	(cd ../kernel; make libconqlow.a)

# Man pages.

cconq.6:	cconq.6in ../kernel/cmdline.6in
	sed -e '/.so ...kernel.cmdline.6in/r $(srcdir)/../kernel/cmdline.6in' -e '/.so ...kernel.cmdline.6in/d' $(srcdir)/cconq.6in >cconq.6.new
	$(srcdir)/../move-if-change cconq.6.new cconq.6

# Installation.

install: all install-only

install-only:
	srcroot=`cd $(srcroot); pwd`; export srcroot; \
	$(INSTALL_PROGRAM) cconq $(bindir); \
	chown $(GAMEUID) $(bindir)/cconq; \
	chgrp $(GAMEGRP) $(bindir)/cconq; \
	chmod $(GAMEPERM) $(bindir)/cconq; \
	$(INSTALL_DATA) cconq.6 $(man6dir)

# Cleanliness support.

clean:
	rm -f *.o core
	rm -f cconq cconq.6 *.conq *.xconq

distclean: clean
	rm -f Makefile config.status

extraclean: distclean
	rm -f *~* .*~*

realclean: distclean

Makefile: Makefile.in $(host_makefile_frag) $(target_makefile_frag)
	$(SHELL) config.status

# Dependencies.

cconq.o:	$(ALL_H) $(C_H)
ccmd.o:		$(ALL_H) $(C_H)
cdraw.o:	$(ALL_H) $(C_H)