1 --- Makefile.orig 2006-03-29 00:08:39.000000000 -0500
2 +++ Makefile 2006-03-29 00:09:36.000000000 -0500
7 -CFLAGS += $(SGE_CFLAGS) -fPIC $(FT_CFLAGS)
8 +CXXFLAGS += $(SGE_CFLAGS) -fPIC $(FT_CFLAGS)
14 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
16 -all: config $(OBJECTS)
17 - @ar rsc libSGE.a $(OBJECTS)
18 +SHARED_LIB=libSGE.so.$(API_VER)
21 -$(OBJECTS): %.o:%.cpp %.h #Each object depends on thier .cpp and .h file
22 - $(CXX) $(CFLAGS) -c $<
23 +all: sge_config.h $(OBJECTS) $(SHARED_LIB) $(STATIC_LIB)
26 - $(CXX) $(CFLAGS) -Wl,-soname,libSGE.so.$(API_VER) -fpic -fPIC -shared -o libSGE.so $(OBJECTS) $(LIBS)
27 +$(STATIC_LIB): $(OBJECTS)
28 + $(AR) rsc libSGE.a $(OBJECTS)
31 +$(OBJECTS): sge_config.h
32 +$(OBJECTS): %.o:%.cpp %.h #Each object depends on their .cpp and .h file
33 + $(CXX) $(CXXFLAGS) -c $<
35 +$(SHARED_LIB): $(OBJECTS)
36 + $(CXX) $(CXXFLAGS) $(LDFLAGS) -Wl,-soname,libSGE.so.$(API_VER) -fpic -fPIC -shared -o libSGE.so $(OBJECTS) $(LIBS)
38 +shared-strip: $(SHARED_LIB)
41 # Building a dll... I have no idea how to do this, but it should be something like below.
42 -dll: config $(OBJECTS)
43 +dll: sge_config.h $(OBJECTS)
44 dlltool --output-def SGE.def $(OBJECTS)
45 dllwrap --driver-name $(CXX) -o SGE.dll --def SGE.def --output-lib libSGE.a --dllname SGE.dll $(OBJECTS) $(LIBS)
49 @rm -f *.o *.so *.a *.dll *.def
52 - @echo "/* SGE Config header (generated automatically) */" >sge_config.h
53 - @echo "#define SGE_VER $(SGE_VER)" >>sge_config.h
55 + @echo "/* SGE Config header (generated automatically) */" >sge_config.h.tmp
56 + @echo "#define SGE_VER $(SGE_VER)" >>sge_config.h.tmp
58 - @echo "#define _SGE_C_AND_CPP" >>sge_config.h
59 + @echo "#define _SGE_C_AND_CPP" >>sge_config.h.tmp
62 - @echo "#define _SGE_NOTTF" >>sge_config.h
63 + @echo "#define _SGE_NOTTF" >>sge_config.h.tmp
66 - @echo "#define _SGE_HAVE_IMG" >>sge_config.h
67 + @echo "#define _SGE_HAVE_IMG" >>sge_config.h.tmp
69 ifeq ($(NO_CLASSES),y)
70 - @echo "#define _SGE_NO_CLASSES" >>sge_config.h
71 + @echo "#define _SGE_NO_CLASSES" >>sge_config.h.tmp
73 + mv sge_config.h.tmp sge_config.h
76 @echo "== SGE r$(SGE_VER)"
82 - @mkdir -p $(PREFIX_H)
83 - install -c -m 644 sge*.h $(PREFIX_H)
84 - @mkdir -p $(PREFIX)/lib
85 - install -c -m 644 libSGE.a $(PREFIX)/lib
86 - install -c libSGE.so $(PREFIX)/lib/libSGE.so.$(API_VER).$(SGE_VER)
88 +install: $(SHARED_LIB) $(STATIC_LIB)
89 + @mkdir -p $(DESTDIR)$(PREFIX_H)
90 + install -c -m 644 sge*.h $(DESTDIR)$(PREFIX_H)
91 + @mkdir -p $(DESTDIR)$(PREFIX)/lib
92 + install -c -m 644 $(STATIC_LIB) $(DESTDIR)$(PREFIX)/lib
93 + install -c libSGE.so $(DESTDIR)$(PREFIX)/lib/libSGE.so.$(API_VER).$(SGE_VER)
94 + @cd $(DESTDIR)$(PREFIX)/lib;\
95 ln -sf libSGE.so.$(API_VER).$(SGE_VER) libSGE.so.$(API_VER);\
96 ln -sf libSGE.so.$(API_VER) libSGE.so
97 @echo "** Headerfiles installed in $(PREFIX_H)"
98 --- Makefile.conf.orig 2006-03-29 00:08:39.000000000 -0500
99 +++ Makefile.conf 2006-03-29 00:08:39.000000000 -0500
101 # Compilers (C and C++)
106 # Make sure sdl-config is available
107 HAVE_SDL =$(shell if (sdl-config --version) < /dev/null > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
109 PREFIX_H =$(shell sdl-config --prefix)/include/SDL
111 # Flags passed to the compiler
112 -CFLAGS =-Wall -O3 -ffast-math
113 +CXXFLAGS ?=-O3 -ffast-math
114 SGE_CFLAGS =$(shell sdl-config --cflags)
115 # Uncomment to make some more optimizations
116 -#CFLAGS =-Wall -O9 -ffast-math -march=i686
117 +#CXXFLAGS =-O9 -ffast-math -march=i686
123 SGE_LIBS =$(shell sdl-config --libs) -lstdc++