--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@
 
 CFLAGS += $(SGE_CFLAGS) -fPIC $(FT_CFLAGS)
 LIBS =$(SGE_LIBS)
+LDFLAGS += $(CUSTOM_LDFLAGS)
 
 SGE_VER = 030809
 API_VER = 0
@@ -11,13 +12,13 @@
 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
 
 all:	config $(OBJECTS) 
-	@ar rsc libSGE.a $(OBJECTS)
+	ar rsc libSGE.a $(OBJECTS)
 
 $(OBJECTS):	%.o:%.cpp %.h   #Each object depends on thier .cpp and .h file
 	$(CXX) $(CFLAGS) -c $<
 
 shared: all
-	$(CXX) $(CFLAGS) -Wl,-soname,libSGE.so.$(API_VER) -fpic -fPIC -shared -o libSGE.so $(OBJECTS) $(LIBS)
+	$(CXX) $(CFLAGS) $(LDFLAGS) -Wl,-soname,libSGE.so.$(API_VER) -fpic -fPIC -shared -o libSGE.so $(OBJECTS) $(LIBS)
 
 shared-strip:	shared
 	@strip libSGE.so
@@ -31,7 +32,7 @@
 	@strip SGE.dll
 
 clean:
-	@rm -f *.o *.so *.a *.dll *.def
+	rm -f *.o *.so *.so.* *.a *.dll *.def
 
 config:
 	@echo "/* SGE Config header (generated automatically) */" >sge_config.h
--- a/Makefile.conf
+++ b/Makefile.conf
@@ -4,7 +4,7 @@
 # (See README for more info)
 C_COMP = y
 #USE_FT = n
-#USE_IMG = n
+USE_IMG = y
 #QUIET = y
 
 
@@ -25,7 +25,7 @@
 PREFIX_H =$(shell sdl-config --prefix)/include/SDL
 
 # Flags passed to the compiler
-CFLAGS =-Wall -O3 -ffast-math
+CFLAGS =-Wall -ffast-math $(CUSTOM_CFLAGS)
 SGE_CFLAGS =$(shell sdl-config --cflags)
 # Uncomment to make some more optimizations
 #CFLAGS =-Wall -O9 -ffast-math -march=i686
