File: Makefile

package info (click to toggle)
libsdl-sge 020904-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 928 kB
  • ctags: 775
  • sloc: cpp: 8,049; makefile: 163; ansic: 44
file content (57 lines) | stat: -rw-r--r-- 1,070 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
# Makefile for the SGE library examples

include ../Makefile.conf


CFLAGS += $(SGE_CFLAGS) -I./../

# Change -L./../ to the directory with libSGE.a
# If you have a shared version of SGE (libSGE.so) you don't really need to link
# to any other library than SGE (but it's no-ops).
LIBS =-L./../ -lSGE $(SGE_LIBS)

TARGETS = fire bitmapfont collision blib rotate speedtest

ifneq ($(NOTTF),y)
  TARGETS += basics blitting input alpha
endif

ifeq ($(USE_IMG),y)
  TARGETS += sfont
endif

ifneq ($(NO_CLASSES),y)
  TARGETS += sprite sprite2
  ifneq ($(NOTTF),y)
    TARGETS += inputdeluxe
  endif
endif

OBJECTS = $(addsuffix .o, $(TARGETS))

ifeq ($(C_ONLY),y)
  all:	basics_c
else
  all:	$(TARGETS)
endif


$(TARGETS):	%:%.o
	$(CXX) -o $@ $< $(LIBS)		

$(OBJECTS):	%.o:%.cpp
	$(CXX) $(CFLAGS) -c $< 	

strip:	all
	@strip $(TARGETS)

# The c example
basics_c:	%:%.o
	$(CC) -o $@ $< $(LIBS)

basics_c.o:	%.o:%.c
	$(CC) $(CFLAGS) -c $<


clean:
	@rm -f *.o fire bitmapfont collision blib rotate basics blitting input alpha sfont sprite sprite2 inputdeluxe basics_c speedtest