File: Makefile

package info (click to toggle)
vectoroids 1.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 676 kB
  • sloc: ansic: 2,308; makefile: 83; sh: 51
file content (67 lines) | stat: -rw-r--r-- 1,679 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
# makefile for Vectoroids

# (Based on Agendaroids)

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

# November 30, 2001 - January 25, 2025


PREFIX=/usr/local
MAN_PREFIX=$(PREFIX)
BIN_PREFIX=$(PREFIX)/bin
DATA_PREFIX=$(PREFIX)/share/vectoroids/
JOY=YES
TARGET_DEF=LINUX
SDL_LIB=$(shell sdl2-config --libs) $(MIXER) -lSDL2_image

NOSOUNDFLAG=__SOUND
MIXER=-lSDL2_mixer

# Debian hardening
CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS=-Wall -Wno-long-long -pedantic -std=c99 -O2 \
	$(shell sdl2-config --cflags) -D$(NOSOUNDFLAG) \
	$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) \
	-DDATA_PREFIX=\"$(DATA_PREFIX)\" -DJOY_$(JOY) -D$(TARGET_DEF)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

all:	vectoroids

embedded:
	make vectoroids TARGET_DEF=EMBEDDED MIXER= JOY=NO \
		DATA_PREFIX=/opt/QtPalmtop/share/vectoroids/ \
		SDL_LIB="/usr/local/arm/lib/libSDL_mixer.a /usr/local/arm/lib/libSDL.a -L/usr/local/arm/lib/ -lpthread -L/opt/Qtopia/sharp/lib -lqpe -lqte" \
		CC=/usr/local/arm/bin/arm-linux-gcc
	/usr/local/arm/bin/arm-linux-strip vectoroids


emtest:
	make vectoroids TARGET_DEF=EMBEDDED

nosound:
	make vectoroids MIXER= NOSOUNDFLAG=NOSOUND

install:
	install -d $(DATA_PREFIX)
	cp -R data/* $(DATA_PREFIX)
	chmod -R a+rX,g-w,o-w $(DATA_PREFIX)
	cp vectoroids $(BIN_PREFIX)
	chmod a+rx,g-w,o-w $(BIN_PREFIX)/vectoroids
	install -d $(MAN_PREFIX)/man/man6/
	cp vectoroids.6 $(MAN_PREFIX)/man/man6/
	chmod a+rx,g-w,o-w $(MAN_PREFIX)/man/man6/vectoroids.6


clean:
	-rm vectoroids
	-rm *.o


vectoroids:	vectoroids.o
	$(CC) $(CFLAGS) vectoroids.o -o vectoroids $(SDL_LIB) $(LDFLAGS)


vectoroids.o:	vectoroids.c