Import from neverball-1.4.0.tar.gz
[neverball-archive.git] / Makefile
blobc2104065259c068d1ff72bcac054f89ae2875154
2 #------------------------------------------------------------------------------
4 # Maybe you need one of these. Maybe you don't.
6 #X11_PATH= -L/usr/X11/lib
7 #X11_PATH= -L/usr/X11R6/lib
9 OGL_LIBS= -lGL -lm
10 #OGL_LIBS= -lm # Think Different
12 #------------------------------------------------------------------------------
14 CFLAGS= -Wall -O3 -ansi $(shell sdl-config --cflags)
15 #CFLAGS= -Wall -g -ansi $(shell sdl-config --cflags)
16 #CFLAGS= -Wall -pg -ansi $(shell sdl-config --cflags)
18 SDL_LIBS= $(shell sdl-config --libs)
19 FT2_LIBS= $(shell freetype-config --libs)
21 MAPC_TARG= mapc
22 BALL_TARG= neverball
23 PUTT_TARG= neverputt
25 MAPC_OBJS= \
26 share/vec3.o \
27 share/image.o \
28 share/solid.o \
29 share/binary.o \
30 share/config.o \
31 share/mapc.o
32 BALL_OBJS= \
33 share/vec3.o \
34 share/image.o \
35 share/solid.o \
36 share/part.o \
37 share/back.o \
38 share/geom.o \
39 share/gui.o \
40 share/config.o \
41 share/binary.o \
42 share/state.o \
43 share/audio.o \
44 ball/hud.o \
45 ball/game.o \
46 ball/level.o \
47 ball/set.o \
48 ball/demo.o \
49 ball/util.o \
50 ball/st_conf.o \
51 ball/st_demo.o \
52 ball/st_save.o \
53 ball/st_fail.o \
54 ball/st_goal.o \
55 ball/st_done.o \
56 ball/st_level.o \
57 ball/st_over.o \
58 ball/st_play.o \
59 ball/st_set.o \
60 ball/st_start.o \
61 ball/st_title.o \
62 ball/main.o
63 PUTT_OBJS= \
64 share/vec3.o \
65 share/image.o \
66 share/solid.o \
67 share/part.o \
68 share/geom.o \
69 share/back.o \
70 share/config.o \
71 share/binary.o \
72 share/audio.o \
73 share/state.o \
74 share/gui.o \
75 putt/hud.o \
76 putt/game.o \
77 putt/hole.o \
78 putt/course.o \
79 putt/st_all.o \
80 putt/st_conf.o \
81 putt/main.o
83 BALL_DEPS= $(BALL_OBJS:.o=.d)
84 PUTT_DEPS= $(PUTT_OBJS:.o=.d)
85 MAPC_DEPS= $(MAPC_OBJS:.o=.d)
87 LIBS= $(X11_PATH) $(SDL_LIBS) -lSDL_image -lSDL_ttf -lSDL_mixer $(FT2_LIBS) $(OGL_LIBS)
89 SOLS= \
90 data/map-rlk/easy.sol \
91 data/map-rlk/peasy.sol \
92 data/map-rlk/coins.sol \
93 data/map-rlk/goslow.sol \
94 data/map-rlk/fence.sol \
95 data/map-rlk/bumper.sol \
96 data/map-rlk/maze.sol \
97 data/map-rlk/goals.sol \
98 data/map-rlk/hole.sol \
99 data/map-rlk/bumps.sol \
100 data/map-rlk/corners.sol \
101 data/map-rlk/easytele.sol \
102 data/map-rlk/zigzag.sol \
103 data/map-rlk/greed.sol \
104 data/map-rlk/mover.sol \
105 data/map-rlk/wakka.sol \
106 data/map-rlk/curbs.sol \
107 data/map-rlk/curved.sol \
108 data/map-rlk/stairs.sol \
109 data/map-rlk/rampdn.sol \
110 data/map-rlk/sync.sol \
111 data/map-rlk/spiralin.sol \
112 data/map-rlk/plinko.sol \
113 data/map-rlk/drops.sol \
114 data/map-rlk/locks.sol \
115 data/map-rlk/grid.sol \
116 data/map-rlk/four.sol \
117 data/map-rlk/telemaze.sol \
118 data/map-rlk/spiraldn.sol \
119 data/map-rlk/islands.sol \
120 data/map-rlk/angle.sol \
121 data/map-rlk/spiralup.sol \
122 data/map-rlk/rampup.sol \
123 data/map-rlk/check.sol \
124 data/map-rlk/risers.sol \
125 data/map-rlk/tilt.sol \
126 data/map-rlk/gaps.sol \
127 data/map-rlk/pyramid.sol \
128 data/map-rlk/quads.sol \
129 data/map-rlk/frogger.sol \
130 data/map-rlk/timer.sol \
131 data/map-rlk/spread.sol \
132 data/map-rlk/hump.sol \
133 data/map-rlk/movers.sol \
134 data/map-rlk/teleport.sol \
135 data/map-rlk/poker.sol \
136 data/map-rlk/invis.sol \
137 data/map-rlk/ring.sol \
138 data/map-rlk/pipe.sol \
139 data/map-rlk/title.sol \
140 data/map-mym/assault.sol \
141 data/map-mym/bombman.sol \
142 data/map-mym/circuit1.sol \
143 data/map-mym/circuit2.sol \
144 data/map-mym/climb.sol \
145 data/map-mym/comeback.sol \
146 data/map-mym/dance2.sol \
147 data/map-mym/dance1.sol \
148 data/map-mym/descent.sol \
149 data/map-mym/drive1.sol \
150 data/map-mym/drive2.sol \
151 data/map-mym/earthquake.sol \
152 data/map-mym/glasstower.sol \
153 data/map-mym/hard.sol \
154 data/map-mym/loop1.sol \
155 data/map-mym/loop2.sol \
156 data/map-mym/maze1.sol \
157 data/map-mym/maze2.sol \
158 data/map-mym/narrow.sol \
159 data/map-mym/running.sol \
160 data/map-mym/scrambling.sol \
161 data/map-mym/snow.sol \
162 data/map-mym/trust.sol \
163 data/map-mym/turn.sol \
164 data/map-mym/up.sol \
165 data/map-putt/01_easy.sol \
166 data/map-putt/02_uturn.sol \
167 data/map-putt/03_kink.sol \
168 data/map-putt/04_aych.sol \
169 data/map-putt/05_ramp.sol \
170 data/map-putt/06_cone.sol \
171 data/map-putt/07_tele.sol \
172 data/map-putt/08_zig.sol \
173 data/map-putt/09_vturn.sol \
174 data/map-putt/10_diamond.sol \
175 data/map-putt/11_mover.sol \
176 data/map-putt/12_bumpy.sol \
177 data/map-putt/13_choose.sol \
178 data/map-putt/14_walls.sol \
179 data/map-putt/15_hole.sol \
180 data/map-putt/16_pipe.sol \
181 data/map-putt/17_timing.sol \
182 data/map-putt/18_hill.sol \
183 data/map-back/alien.sol \
184 data/map-back/blank.sol \
185 data/map-back/city.sol \
186 data/map-back/clouds.sol \
187 data/map-back/ocean.sol \
188 data/map-back/jupiter.sol \
189 data/map-paxed/01_fastpenta.sol \
190 data/map-paxed/02_bumpy_road.sol \
191 data/map-paxed/03_zigzag.sol \
192 data/map-paxed/04_u_twist.sol \
193 data/map-paxed/05_hookey.sol \
194 data/map-paxed/06_partitions.sol \
195 data/map-paxed/07_a_danger.sol \
196 data/map-paxed/08_f.sol \
197 data/map-paxed/09_rampedge.sol \
198 data/map-paxed/10_pentomino.sol \
199 data/map-paxed/11_stapler.sol \
200 data/map-paxed/12_helixramp.sol \
201 data/map-paxed/13_loch_ness.sol \
202 data/map-paxed/14_figur8.sol \
203 data/map-paxed/15_upNdown.sol \
204 data/map-paxed/16_pyramidian.sol \
205 data/map-paxed/17_oopsydaisy.sol \
206 data/map-paxed/18_3rd_floor.sol \
207 data/map-paxed/a.sol \
208 data/map-paxed/b.sol \
209 data/map-paxed/c.sol \
210 data/map-paxed/d.sol \
211 data/map-paxed/e.sol \
212 data/map-paxed/f.sol \
213 data/map-paxed/g.sol \
214 data/map-paxed/h.sol \
215 data/map-paxed/i.sol \
216 data/map-paxed/j.sol \
217 data/map-paxed/k.sol \
218 data/map-paxed/l.sol \
219 data/map-paxed/m.sol \
220 data/map-paxed/n.sol \
221 data/map-paxed/o.sol \
222 data/map-paxed/p.sol \
223 data/map-paxed/q.sol \
224 data/map-paxed/r.sol \
225 data/map-paxed/s.sol \
226 data/map-paxed/t.sol \
227 data/map-paxed/u.sol \
228 data/map-paxed/v.sol \
229 data/map-paxed/w.sol \
230 data/map-paxed/x.sol \
231 data/map-paxed/y.sol \
232 data/map-paxed/z.sol
234 #------------------------------------------------------------------------------
236 %.d : %.c
237 $(CC) $(CFLAGS) -Ishare -MM -MF $@ $<
239 %.o : %.c
240 $(CC) $(CFLAGS) -Ishare -o $@ -c $<
242 data/map-rlk/%.sol : data/map-rlk/%.map $(MAPC_TARG)
243 ./$(MAPC_TARG) $< data
245 data/map-mym/%.sol : data/map-mym/%.map $(MAPC_TARG)
246 ./$(MAPC_TARG) $< data
248 data/map-putt/%.sol : data/map-putt/%.map $(MAPC_TARG)
249 ./$(MAPC_TARG) $< data
251 data/map-back/%.sol : data/map-back/%.map $(MAPC_TARG)
252 ./$(MAPC_TARG) $< data
254 data/map-paxed/%.sol : data/map-paxed/%.map $(MAPC_TARG)
255 ./$(MAPC_TARG) $< data
257 #------------------------------------------------------------------------------
259 all : $(BALL_TARG) $(PUTT_TARG) $(MAPC_TARG) $(SOLS)
261 $(BALL_TARG) : $(BALL_OBJS)
262 $(CC) $(CFLAGS) -o $(BALL_TARG) $(BALL_OBJS) $(LIBS)
264 $(PUTT_TARG) : $(PUTT_OBJS)
265 $(CC) $(CFLAGS) -o $(PUTT_TARG) $(PUTT_OBJS) $(LIBS)
267 $(MAPC_TARG) : $(MAPC_OBJS)
268 $(CC) $(CFLAGS) -o $(MAPC_TARG) $(MAPC_OBJS) $(LIBS)
270 clean-src :
271 rm -f $(BALL_TARG) $(BALL_OBJS) $(BALL_DEPS)
272 rm -f $(PUTT_TARG) $(PUTT_OBJS) $(PUTT_DEPS)
273 rm -f $(MAPC_TARG) $(MAPC_OBJS) $(MAPC_DEPS)
275 clean : clean-src
276 rm -f $(SOLS)
278 test : all
279 ./neverball
281 #------------------------------------------------------------------------------