File: Makefile.in

package info (click to toggle)
crossfire-client 0.95.4-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,028 kB
  • ctags: 1,144
  • sloc: ansic: 11,408; sh: 1,885; makefile: 237; perl: 48
file content (200 lines) | stat: -rw-r--r-- 3,927 bytes parent folder | download
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
VERSION = crossfire-client-@VERSION@
MKDIR = @MKDIR@
CP = @CP@
TAR = @TAR@
RM = @RM@
TARGET = @TARGET@
CFLAGS = @CFLAGS@ @CPPFLAGS@ -I.
LDFLAGS = @LDFLAGS@
CC = @CC@
LIBS = @LIBS@ @LIBXPM_LIB@
INSTALL = @INSTALL@
DEPEND = @DEPEND@
PERL = @PERL@
SOUND_DIR = @SOUNDDIR@

prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
mandir=@mandir@/man1

HEADERS= \
	cconfig.h		\
	client.h		\
	clientbmap.h		\
	item.h			\
	item_types.h		\
        newclient.h		\
	proto.h			\
	soundsdef.h		

SOURCES = \
	client.c		\
	commands.c		\
	init.c			\
	item.c			\
	misc.c			\
	newsocket.c		\
	player.c		\
	sound.c

GTK_SOURCES = $(SOURCES) gx11.c
GTK_OBJS= $(GTK_SOURCES:.c=.o)

X11_SOURCES = $(SOURCES) x11.c
X11_OBJS= $(X11_SOURCES:.c=.o)
X_CFLAGS=@X_CFLAGS@
X_LIBS=@X_LIBS@

GTK_CFLAGS=@GTK_CFLAGS@
GTK_LIBS=@GTK_LIBS@
SND_LIBS=@SND_LIBS@

# proto only wants the .c files 

PROTOSOURCES= \
	client.c		\
	commands.c		\
	init.c			\
	item.c			\
	misc.c			\
	newsocket.c		\
	player.c		\
	sound.c			\
	x11.c

EXTRA_DIST = \
	aclocal.m4		\
	CHANGES			\
	COPYING			\
	Makefile.in		\
	Protocol		\
	README			\
	README.old		\
	aclocal.m4		\
	client.man		\
	config.h.in		\
	configure		\
	configure.in		\
	def_keys		\
	def-keys.h		\
	item_types		\
	items.pl		\
	sounds.dist		\
	x11.c			\
	xutil.c			\
	gx11.c			\
	cfsndserv.c

PIXMAPS = \
	pixmaps/all.xpm		\
	pixmaps/applied.xpm	\
	pixmaps/bg.xpm		\
	pixmaps/close.xpm	\
	pixmaps/coin.xpm	\
	pixmaps/crossfiretitle.xpm	\
	pixmaps/cursed.xpm	\
	pixmaps/damned.xpm	\
	pixmaps/hand.xpm	\
	pixmaps/hand2.xpm	\
	pixmaps/lock.xpm	\
	pixmaps/locked.xpm	\
	pixmaps/mag.xpm		\
	pixmaps/magic.xpm	\
	pixmaps/nonmag.xpm	\
	pixmaps/question.111	\
	pixmaps/question.xpm	\
	pixmaps/skull.xpm	\
	pixmaps/stipple.111	\
	pixmaps/stipple.112	\
	pixmaps/test.xpm	\
	pixmaps/unpaid.xpm	

HELP= \
	help/chelp.h		\
	help/shelp.h		\
	help/about.h

UTILS = \
	utils/config.guess	\
	utils/config.sub	\
	utils/mdk.sh		\
	utils/deftoheader.pl	\
	utils/install-sh	\
	utils/missing		\
	utils/mkinstalldirs

SND_SOURCES = cfsndserv.c misc.c
SND_OBJS= $(SND_SOURCES:.c=.o)


INCLUDES = @X_CFLAGS@

all:  @TARGET@ def-keys.h

gcfclient: $(GTK_OBJS)
	$(CC) -o gcfclient $(GTK_OBJS) $(LDFLAGS) $(LIBS) $(GTK_LIBS)

cfclient: $(X11_OBJS)
	$(CC) -o cfclient $(X11_OBJS) $(LDFLAGS) $(LIBS) $(X_LIBS)

# grumble grumble.  cextract can't seem to handle gx11.c
proto:
	cextract +p -P -o proto.h.bak -DCFCLIENT \
	-cpp-program="gcc -E -C" $(INCLUDES) -I. $(PROTOSOURCES)
	sed -e "s/#if __STDC__/#ifdef __STDC__/" -e "/__inline/d" < \
	proto.h.bak > proto.h
	$(RM) -f proto.h.bak
	chmod 664 proto.h

item_types.h: item_types
	items.pl

def-keys.h: def_keys
	utils/mdk.sh

sounds: sounds.dist Makefile
	$(PERL) -p -e s#/usr/local/lib/sounds#$(SOUND_DIR)# sounds.dist > sounds


soundsdef.h: sounds
	utils/deftoheader.pl sounds soundsdef.h def_sounds

.c.o:
	$(CC) $(CFLAGS) $(INCLUDES) -c $*.c

gx11.o: gx11.c
	$(CC) $(CFLAGS) $(GTK_CFLAGS) $(INCLUDES) -c gx11.c

x11.o: x11.c
	$(CC) $(CFLAGS) $(X_CFLAGS) $(INCLUDES) -c x11.c

cfsndserv: $(SND_OBJS)
	$(CC) -o cfsndserv $(SND_OBJS) $(LDFLAGS) $(SND_LIBS)

archive:
	if [ -d /tmp/$(VERSION) ]; then $(RM) -rf /tmp/$(VERSION); fi
	$(MKDIR) /tmp/$(VERSION) /tmp/$(VERSION)/utils /tmp/$(VERSION)/help /tmp/$(VERSION)/pixmaps
	$(CP) $(HEADERS) $(SOURCES) $(EXTRA_DIST) /tmp/$(VERSION)
	$(CP) $(PIXMAPS) /tmp/$(VERSION)/pixmaps
	$(CP) $(HELP) /tmp/$(VERSION)/help
	$(CP) $(UTILS) /tmp/$(VERSION)/utils
	(cd /tmp; $(RM) $(VERSION).tgz; \
		$(TAR) cvfhz $(VERSION).tar.gz $(VERSION) )
	$(CP) /tmp/$(VERSION).tar.gz ../
	$(RM) -rf /tmp/$(VERSION) /tmp/$(VERSION).tar.gz


clean::
	$(RM) -f $(TARGET) $(GTK_OBJS) x11.o Makefile.bak

install:
	$(INSTALL) $(TARGET) ${bindir}
	$(INSTALL) client.man ${mandir}/cfclient.1
	@if [ -x gcfclient ]; then \
	    	$(INSTALL) client.man ${mandir}/gcfclient.1; \
	fi

depend:
	$(DEPEND) $(DEPENDFLAGS) -- $(CFLAGS) $(INCLUDES)  -- $(PROTOSOURCES) $(SND_SOURCES)