-
Notifications
You must be signed in to change notification settings - Fork 0
/
Imakefile
executable file
·190 lines (163 loc) · 5.22 KB
/
Imakefile
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
#XCOMM ***********************************************************
#XCOMM ---> Configuration options was moved indo Iconfig <----
#XCOMM ***********************************************************
#include "Iconfig"
#ifdef I386ASSEMBLY
ASMDEF = -DASSEMBLY
#endif
SUBDIRS=xlib util
#define IHaveSubdirs
#ifdef NETWORK
NET = -DNETSUPPORT
#endif
#ifdef JOYSTICK
JOYSTICK1 = -DJOYSTICK
#endif
#ifdef MITSHM
MITSHM1 = -DMITSHM
#endif
#ifdef HAVEUSLEEP
HAVEUSLEEP1 = -DHAVEUSLEEP
#endif
#ifndef SOUND
#ifndef NAS_SOUND
#ifndef RSOUND
DEFINES = -DONLYANSI $(JOYSTICK1) $(NET) $(MITSHM1) $(HAVEUSLEEP1) $(SYSDEFS) $(JOYSTICK) -Ixlib\
$(NAMEDEF) $(ASMDEF)
#else
INSTALLSOUND = True
NASLIB = -L/usr/local/lib/rplay -lrplay
SOUNDOBJS = rsound.o
DEFINES = -DONLYANSI -DRSOUND $(JOYSTICK1) $(NET) $(MITSHM1) $(HAVEUSLEEP1) $(SYSDEFS) $(JOYSTICK) -Ixlib\
$(NAMEDEF) $(ASMDEF)\
-DSOUNDDIR=\"$(SOUNDDIR)\"
#endif
#else
INSTALLSOUND = True
NASLIB = -laudio
SOUNDOBJS = nas_sound.o
DEFINES = -DONLYANSI -DNAS_SOUND $(JOYSTICK1) $(NET) $(MITSHM1) $(HAVEUSLEEP1) $(SYSDEFS) $(JOYSTICK) -Ixlib\
$(NAMEDEF) $(ASMDEF)\
-DSOUNDDIR=\"$(SOUNDDIR)\"
#endif
#else
INSTALLSOUND = True
DEFINES = -DONLYANSI -DSOUND $(JOYSTICK1) $(NET) $(MITSHM1) $(HAVEUSLEEP1) $(SYSDEFS) $(JOYSTICK) -Ixlib\
$(NAMEDEF) $(ASMDEF)\
-DSOUNDSERVER=\"$(SOUNDDIR)/$(SOUNDSERVER)\" \
-DSOUNDDIR=\"$(SOUNDDIR)\" \
-DSOUNDDEV=\"$(SOUNDDEV)\"
#endif
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
OBJS = koules.o menu.o gameplan.o font.o intro.o rcfiles.o \
framebuffer.o cmap-x11.o sound.o nas_sound.o rsound.o client.o server.o sock.o objectsio.o mygetopt.o
SRCS = koules.c menu.c gameplan.c font.c intro.c rcfiles.c\
framebuffer.c cmap-x11.c sound.c nas_sound.c rsound.c client.c server.c sock.c objectsio.c mygetopt.c
LOCAL_LIBRARIES = util/libutils.a xlib/libxlib.a $(NASLIB) $(XLIB) $(EXTRALIB) -lm
DEPLIBS= util/libutils.a xlib/libxlib.a $(DEPXLIB)
util/libutils.a::
cd util && make libutils.a
xlib/libxlib.a::
cd xlib && make libxlib.a
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
#ifdef SOUND
all::xkoules $(SOUNDSERVER)
#else
all::xkoules
#endif
BINDIR = $(KOULESDIR)
DESTDIR = /
ComplexProgramTarget(xkoules)
#ifdef SOUND
NormalProgramTarget($(SOUNDSERVER), $(SOUNDSERVER).o,,,)
#endif
#ifdef NAS_SOUND
install:: $(PROGRAMS) $(SOUNDSERVER)
@echo "Koules directory is " $(KOULESDIR)
@:
@echo "Instalin man page to " $(MANDIR)
@mkdirhier $(MANDIR)
$(INSTALL) -c $(INSTBINFLAGS) xkoules.6 $(MANDIR);
@:
@echo "Creating directory " $(KOULESDIR)
@if [ ! -d $(KOULESDIR) ]; then mkdirhier $(KOULESDIR); fi
@:
@if [ "$(INSTALLSOUND)" = "True" ]; \
then \
echo "Creating directory " $(SOUNDDIR); \
if [ ! -d $(SOUNDDIR) ]; then mkdirhier $(SOUNDDIR); fi; \
echo "Copying sound server to directory " $(SOUNDDIR); \
$(INSTALL) -c -s $(INSTBINFLAGS) $(SOUNDSERVER) $(SOUNDDIR); \
echo "Copying sound files into directory " $(SOUNDDIR); \
cd ./sounds; set -x; \
for file in *.raw; do \
auconvert -raw linu8 1 -rate 8000 -volume 40 $$file -file snd `basename $$file .raw`.au ; \
$(INSTALL) -c $(INSTDATFLAGS) `basename $$file .raw`.au $(SOUNDDIR); \
done; \
fi
@echo
@echo Do not forget send filled Card to author
@echo
#else
#ifdef RSOUND
install:: $(PROGRAMS) $(SOUNDSERVER)
@echo "Koules directory is " $(KOULESDIR)
@:
@echo "Instalin man page to " $(MANDIR)
@mkdirhier $(MANDIR)
$(INSTALL) -c $(INSTBINFLAGS) xkoules.6 $(MANDIR);
@:
@echo "Creating directory " $(KOULESDIR)
@if [ ! -d $(KOULESDIR) ]; then mkdirhier $(KOULESDIR); fi
@:
@if [ "$(INSTALLSOUND)" = "True" ]; \
then \
echo "Creating directory " $(SOUNDDIR); \
if [ ! -d $(SOUNDDIR) ]; then mkdirhier $(SOUNDDIR); fi; \
echo "Copying sound server to directory " $(SOUNDDIR); \
$(INSTALL) -c -s $(INSTBINFLAGS) $(SOUNDSERVER) $(SOUNDDIR); \
echo "Copying sound files into directory " $(SOUNDDIR); \
cd ./sounds; set -x; \
for file in *.raw; do \
sh ../myauconvert $$file `basename $$file .raw`.au ; \
$(INSTALL) -c $(INSTDATFLAGS) `basename $$file .raw`.au $(SOUNDDIR); \
done; \
fi
@echo
@echo
@echo
@echo
@echo Don't forget send filled Card to author
@echo
#else
install:: $(PROGRAMS) $(SOUNDSERVER)
@echo "Koules directory is " $(KOULESDIR)
@:
@echo "Instalin man page to " $(MANDIR)
@mkdirhier $(MANDIR)
$(INSTALL) -c $(INSTBINFLAGS) xkoules.6 $(MANDIR);
@:
@echo "Creating directory " $(KOULESDIR)
@if [ ! -d $(KOULESDIR) ]; then mkdirhier $(KOULESDIR); fi
@:
@if [ "$(INSTALLSOUND)" = "True" ]; \
then \
echo "Creating directory " $(SOUNDDIR); \
if [ ! -d $(SOUNDDIR) ]; then mkdirhier $(SOUNDDIR); fi; \
echo "Copying sound server to directory " $(SOUNDDIR); \
$(INSTALL) -c -s $(INSTBINFLAGS) $(SOUNDSERVER) $(SOUNDDIR); \
echo "Copying sound files into directory " $(SOUNDDIR); \
cd ./sounds; set -x; \
for file in *.raw; do \
$(INSTALL) -c $(INSTDATFLAGS) $$file $(SOUNDDIR); \
done; \
fi
@echo
@echo
@echo
@echo
@echo Dont forget send filled Card to author
@echo
#endif
#endif