Updated -h for networking.
[crow/jumpnbump.git] / Makefile
1 OBJS = sdl/gfx.o sdl/interrpt.o sdl/sound.o sdl/input.o fireworks.o main.o menu.o
2 TARGET = jumpnbump
3
4 CC = gcc
5 CFLAGS = -Wall -O2 -ffast-math -funroll-loops -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DUSE_SDL -DNDEBUG -I. $(shell sdl-config --cflags) -DUSE_NET
6 LIBS = -lm $(shell sdl-config --libs) -lSDL_mixer -lSDL_net
7
8 .PHONY: data
9
10 all: $(TARGET) jnbpack jnbunpack gobpack data
11
12 $(TARGET): $(OBJS)
13         $(CC) $(LFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
14
15 jnbpack: modify/jnbpack.o
16         $(CC) $(LFLAGS) -o jnbpack modify/jnbpack.o $(LIBS)
17
18 jnbunpack: modify/jnbunpack.o
19         $(CC) $(LFLAGS) -o jnbunpack modify/jnbunpack.o $(LIBS)
20
21 gobpack: modify/gobpack.o
22         $(CC) $(LFLAGS) -o gobpack modify/gobpack.o $(LIBS)
23
24 data: jnbpack
25         $(MAKE) -C data
26
27 clean:
28         rm -f $(TARGET) jnbpack jnbunpack *.o sdl/*.o *~ log modify/*.o
29         $(MAKE) -C data clean
30
31 install:
32         mkdir -p $(DESTDIR)/usr/games/
33         mkdir -p $(DESTDIR)/usr/share/jumpnbump/
34         install -o root -g games -m 755 $(TARGET) jumpnbump.svgalib jumpnbump.fbcon gobpack jnbpack jnbunpack jnbmenu.tcl $(DESTDIR)/usr/games/
35         install -o root -g games -m 644 data/jumpbump.dat $(DESTDIR)/usr/share/jumpnbump/jumpbump.dat
36
37 uninstall:
38         rm /usr/games/jnbpack /usr/games/jnbunpack /usr/games/jumpnbump /usr/games/jnbmenu.tcl /usr/games/jumpnbump.fbcon /usr/games/jumpnbump.svgalib /usr/games/gobpack
39
40 doc:
41         rman jumpnbump.6 -f HTML >jumpnbump.html