blob: 50e5241c9fb0a4d98d93c73674c9034a592817a4 (
plain) (
blame)
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
|
--- Makefile.orig Thu Mar 25 07:34:46 2004
+++ Makefile Sun Mar 28 14:37:35 2004
@@ -20,7 +20,7 @@
# directory where the games are installed (/usr, /usr/local, ... or something)
ifndef PREFIX
-PREFIX=/usr
+PREFIX=/usr/local
endif
PROGRAM = njam
@@ -29,15 +29,15 @@
# If you hate warnings under Cygwin use these flags instead
# MY_CFLAGS = -I/usr/local/include/SDL -Dmain=SDL_main -DWIN32 -Uunix -mno-cygwin
-MY_CFLAGS = `sdl-config --cflags`
+MY_CFLAGS += `sdl11-config --cflags`
%.o: %.cpp
- $(CC) -O3 -c $(MY_CFLAGS) $< -o $@
+ $(CC) -c $(MY_CFLAGS) $< -o $@
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS)
- $(CC) `sdl-config --libs` -o$(PROGRAM) $(OBJECTS) -lSDL -lSDL_mixer -lSDL_net -lSDL_image
+ $(CC) `sdl11-config --libs` -o$(PROGRAM) $(OBJECTS) -lSDL_mixer -lSDL_net -lSDL_image
clean:
$(RM) *.o
@@ -45,25 +45,16 @@
$(RM) $(PROGRAM).exe
install: $(PROGRAM)
- mkdir -m 755 -p $(PREFIX)/games/njam
- mkdir -m 755 -p $(PREFIX)/games/njam/data
- mkdir -m 755 -p $(PREFIX)/games/njam/skins
- mkdir -m 755 -p $(PREFIX)/games/njam/html
- mkdir -m 755 -p $(PREFIX)/games/njam/levels
- install -o root -g games -m 755 njam $(PREFIX)/games/njam
- install -o root -g games -m 644 data/* $(PREFIX)/games/njam/data
- install -o root -g games -m 644 skins/* $(PREFIX)/games/njam/skins
- install -o root -g games -m 644 html/* $(PREFIX)/games/njam/html
- install -o root -g games -m 6777 levels/* $(PREFIX)/games/njam/levels
- echo '#!/bin/sh' > /usr/bin/njam
- echo '$(PREFIX)/games/njam/njam $$1' >> /usr/bin/njam
- chmod 755 /usr/bin/njam
- @echo
- @echo ------------------ Install completed ------------------------------
- @echo Type \"njam\" to play the game.
- @echo You can link \"$(PREFIX)/games/njam/njam\" into menus/toolbars.
- @echo -------------------------------------------------------------------
- @echo
+ mkdir -m 755 -p $(PREFIX)/share/njam
+ mkdir -m 755 -p $(PREFIX)/share/njam/data
+ mkdir -m 755 -p $(PREFIX)/share/njam/skins
+ mkdir -m 755 -p $(PREFIX)/share/njam/html
+ mkdir -m 755 -p $(PREFIX)/share/njam/levels
+ install -o root -g games -m 755 njam $(PREFIX)/share/njam
+ install -o root -g games -m 644 data/* $(PREFIX)/share/njam/data
+ install -o root -g games -m 644 skins/* $(PREFIX)/share/njam/skins
+ install -o root -g games -m 644 html/* $(PREFIX)/share/njam/html
+ install -o root -g games -m 644 levels/* $(PREFIX)/share/njam/levels
uninstall:
rm -rf $(PREFIX)/games/njam
|