|
0 |
--- libsdl-sge-030809dfsg.orig/Makefile.conf
|
|
1 |
+++ libsdl-sge-030809dfsg/Makefile.conf
|
|
2 |
@@ -11,6 +11,7 @@
|
|
3 |
# Compilers (C and C++)
|
|
4 |
CC=gcc
|
|
5 |
CXX=g++
|
|
6 |
+PKG_CONFIG?=pkg-config
|
|
7 |
|
|
8 |
# Make sure sdl-config is available
|
|
9 |
HAVE_SDL =$(shell if (sdl-config --version) < /dev/null > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
|
|
10 |
@@ -36,15 +37,15 @@
|
|
11 |
|
|
12 |
|
|
13 |
# Is freetype-config available?
|
|
14 |
-HAVE_FT =$(shell if (pkg-config --modversion freetype2) < /dev/null > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
|
|
15 |
+HAVE_FT =$(shell if ($(PKG_CONFIG) --modversion freetype2) < /dev/null > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
|
|
16 |
ifeq ($(HAVE_FT),n)
|
|
17 |
USE_FT = n
|
|
18 |
endif
|
|
19 |
|
|
20 |
ifneq ($(USE_FT),n)
|
|
21 |
USE_FT = y
|
|
22 |
- SGE_LIBS +=$(shell pkg-config freetype2 --libs)
|
|
23 |
- FT_CFLAGS =$(shell pkg-config freetype2 --cflags)
|
|
24 |
+ SGE_LIBS +=$(shell $(PKG_CONFIG) freetype2 --libs)
|
|
25 |
+ FT_CFLAGS =$(shell $(PKG_CONFIG) freetype2 --cflags)
|
|
26 |
endif
|
|
27 |
|
|
28 |
|
|
29 |
--- libsdl-sge-030809dfsg.orig/Makefile
|
|
30 |
+++ libsdl-sge-030809dfsg/Makefile
|
|
31 |
@@ -11,20 +11,21 @@
|
|
32 |
|
|
33 |
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
|
|
34 |
|
|
35 |
-all: config $(OBJECTS)
|
|
36 |
+all: sge_config.h $(OBJECTS)
|
|
37 |
ar rsc libSGE.a $(OBJECTS)
|
|
38 |
|
|
39 |
$(OBJECTS): %.o:%.cpp %.h #Each object depends on thier .cpp and .h file
|
|
40 |
$(CXX) $(CFLAGS) -c $<
|
|
41 |
|
|
42 |
-shared: all
|
|
43 |
+shared: libSGE.so
|
|
44 |
+libSGE.so: sge_config.h $(OBJECTS)
|
|
45 |
$(CXX) $(CFLAGS) $(LDFLAGS) -Wl,-soname,libSGE.so.$(API_VER) -fpic -fPIC -shared -o libSGE.so $(OBJECTS) $(LIBS)
|
|
46 |
|
|
47 |
shared-strip: shared
|
|
48 |
@strip libSGE.so
|
|
49 |
|
|
50 |
# Building a dll... I have no idea how to do this, but it should be something like below.
|
|
51 |
-dll: config $(OBJECTS)
|
|
52 |
+dll: sge_config.h $(OBJECTS)
|
|
53 |
dlltool --output-def SGE.def $(OBJECTS)
|
|
54 |
dllwrap --driver-name $(CXX) -o SGE.dll --def SGE.def --output-lib libSGE.a --dllname SGE.dll $(OBJECTS) $(LIBS)
|
|
55 |
|
|
56 |
@@ -34,7 +35,8 @@
|
|
57 |
clean:
|
|
58 |
rm -f *.o *.so *.so.* *.a *.dll *.def
|
|
59 |
|
|
60 |
-config:
|
|
61 |
+config:sge_config.h
|
|
62 |
+sge_config.h:
|
|
63 |
@echo "/* SGE Config header (generated automatically) */" >sge_config.h
|
|
64 |
@echo "#define SGE_VER $(SGE_VER)" >>sge_config.h
|
|
65 |
ifeq ($(C_COMP),y)
|