Debian Codegraph @

Makefile

raw ◀ ▶
Source reconstructed at patch state 0 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 # Makefile for the SGE library
2
3 include Makefile.conf
4
5 CFLAGS += $(SGE_CFLAGS) -fPIC $(FT_CFLAGS)
6 LIBS =$(SGE_LIBS)
7
8 SGE_VER = 030809
9 API_VER = 0
10
11 OBJECTS=sge_surface.o sge_primitives.o sge_tt_text.o sge_bm_text.o sge_misc.o sge_textpp.o sge_blib.o sge_rotation.o sge_collision.o sge_shape.o
12
13 all: config $(OBJECTS)
14 @ar rsc libSGE.a $(OBJECTS)
15
16 $(OBJECTS): %.o:%.cpp %.h #Each object depends on thier .cpp and .h file
17 $(CXX) $(CFLAGS) -c $<
18
19 shared: all
20 $(CXX) $(CFLAGS) -Wl,-soname,libSGE.so.$(API_VER) -fpic -fPIC -shared -o libSGE.so $(OBJECTS) $(LIBS)
21
22 shared-strip: shared
23 @strip libSGE.so
24
25 # Building a dll... I have no idea how to do this, but it should be something like below.
26 dll: config $(OBJECTS)
27 dlltool --output-def SGE.def $(OBJECTS)
28 dllwrap --driver-name $(CXX) -o SGE.dll --def SGE.def --output-lib libSGE.a --dllname SGE.dll $(OBJECTS) $(LIBS)
29
30 dll-strip: dll
31 @strip SGE.dll
32
33 clean:
34 @rm -f *.o *.so *.a *.dll *.def
35
36 config:
37 @echo "/* SGE Config header (generated automatically) */" >sge_config.h
38 @echo "#define SGE_VER $(SGE_VER)" >>sge_config.h
39 ifeq ($(C_COMP),y)
40 @echo "#define _SGE_C_AND_CPP" >>sge_config.h
41 endif
42 ifeq ($(USE_FT),n)
43 @echo "#define _SGE_NOTTF" >>sge_config.h
44 endif
45 ifeq ($(USE_IMG),y)
46 @echo "#define _SGE_HAVE_IMG" >>sge_config.h
47 endif
48 ifeq ($(NO_CLASSES),y)
49 @echo "#define _SGE_NO_CLASSES" >>sge_config.h
50 endif
51
52 ifneq ($(QUIET),y)
53 @echo "== SGE r$(SGE_VER)"
54 ifeq ($(C_COMP),y)
55 @echo "== Note: Trying to be C friendly."
56 endif
57 ifeq ($(USE_FT),n)
58 @echo "== FreeType2 support disabled."
59 else
60 @echo "== FreeType2 support enabled."
61 endif
62 ifeq ($(USE_IMG),y)
63 @echo "== SDL_Image (SFont) support enabled."
64 else
65 @echo "== SDL_Image (SFont) support disabled."
66 endif
67 ifeq ($(NO_CLASSES),y)
68 @echo "== Warning: No C++ classes will be build!"
69 endif
70 @echo ""
71 endif
72
73 install: shared
74 @mkdir -p $(PREFIX_H)
75 install -c -m 644 sge*.h $(PREFIX_H)
76 @mkdir -p $(PREFIX)/lib
77 install -c -m 644 libSGE.a $(PREFIX)/lib
78 install -c libSGE.so $(PREFIX)/lib/libSGE.so.$(API_VER).$(SGE_VER)
79 @cd $(PREFIX)/lib;\
80 ln -sf libSGE.so.$(API_VER).$(SGE_VER) libSGE.so.$(API_VER);\
81 ln -sf libSGE.so.$(API_VER) libSGE.so
82 @echo "** Headerfiles installed in $(PREFIX_H)"
83 @echo "** Library files installed in $(PREFIX)/lib"