Debian Codegraph @

Makefile

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