File: Makefile

package info (click to toggle)
bugsquish 0.0.4-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,172 kB
  • ctags: 151
  • sloc: ansic: 1,250; makefile: 84
file content (77 lines) | stat: -rw-r--r-- 1,450 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
# Makefile for bugsquish

# by Bill Kendrick
# bill@newbreedsoftware.com
# http://www.newbreedsoftware.com/

# March 19, 2000 - December 14, 2000


# User-definable stuff:

BIN_PREFIX=/usr/local/bin/
DATA_PREFIX=/usr/share/bugsquish/


# Defaults for Linux:

TARGET=bugsquish
TARGET_DEF=LINUX


CFLAGS=-Wall -O2 $(SDL_CFLAGS) -DDATA_PREFIX=\"$(DATA_PREFIX)\" \
        -D$(NOSOUNDFLAG) -D$(TARGET_DEF)


# Other definitions:

MIXER=-lSDL_mixer
IMAGE=-lSDL_image
NOSOUNDFLAG=__SOUND
SDL_LIB=$(SDL_LDFLAGS) $(MIXER) $(IMAGE)
SDL_CFLAGS := $(shell sdl-config --cflags)
SDL_LDFLAGS := $(shell sdl-config --libs)

installbin = install -g root -o root -m 755 
installdat = install -g root -o root -m 644


# Make commands:

all:	$(TARGET)

install:
	mkdir -p $(DATA_PREFIX)
	cp -r data/* $(DATA_PREFIX)
	chown -R root.root $(DATA_PREFIX)
	chmod -R a+rX,g-w,o-w $(DATA_PREFIX)
	cp bugsquish $(BIN_PREFIX)
	chown root.root $(BIN_PREFIX)/bugsquish
	chmod a+rx,g-w,o-w $(BIN_PREFIX)/bugsquish


nosound:
	make bugsquish MIXER= NOSOUNDFLAG=NOSOUND

win32:
	make TARGET_DEF=WIN32 TARGET=bugsquish.exe DATA_PREFIX=data/
	cp /usr/local/cross-tools/i386-mingw32/lib/SDL*.dll .
	chmod 644 SDL*.dll

clean:
	-rm bugsquish bugsquish.exe
	-rm *.o
	-rm SDL*.dll


# Main executable:

$(TARGET):	bugsquish.o
	$(CC) $(CFLAGS) bugsquish.o -o $(TARGET) $(SDL_LIB)


# Main object:

bugsquish.o:	bugsquish.c \
		data/images/flyswatter.xbm \
		data/images/flyswatter-mask.xbm