--- freelords/src/Makefile~ Mon Aug 5 11:55:16 2002 +++ freelords/src/Makefile Wed Sep 18 16:49:45 2002 @@ -1,10 +1,12 @@ # Makefile for src CXX = g++ +CXXFLAGS = -O2 INCLUDES = -Icommon -Igraphic CPPFLAGS = -g -Wall -Werror $(INCLUDES) `paragui-config --cflags` PROFILERFLAGS = -pg -fprofile-arcs -LFLAGS = `paragui-config --libs` -L/usr/lib -lSDL_image -lexpat -L./common -lflcommon -L./graphic -lflgraphic +LDFLAGS = -s +LIBS = `paragui-config --libs` -lSDL_image -lexpat -L./common -lflcommon -L./graphic -lflgraphic TARGET = freelords OBJECTS = main.o @@ -15,11 +17,11 @@ @echo "FreeLords has successfully built" MYLIBS: - cd common; $(MAKE); - cd graphic; $(MAKE); + cd common; $(MAKE) CXXFLAGS="$(CXXFLAGS)"; + cd graphic; $(MAKE) CXXFLAGS="$(CXXFLAGS)"; $(TARGET): $(OBJECTS) - $(CXX) -Wall $(W_ERROR) -g $(LFLAGS) $(OBJECTS) -o $(TARGET) + $(CXX) -Wall $(W_ERROR) $(LFLAGS) $(LIBS) $(OBJECTS) -o $(TARGET) clean: cd common && $(MAKE) clean --- freelords/src/common/Makefile~ Wed Sep 18 16:29:08 2002 +++ freelords/src/common/Makefile Wed Sep 18 16:29:08 2002 @@ -1,8 +1,9 @@ # Makefile for src/common CXX = g++ +CXXFLSGS = -O2 -g INCLUDES = -I. -I../graphic -CPPFLAGS = -g -Wall -Werror -fPIC `paragui-config --cflags` $(INCLUDES) +CPPFLAGS = -Wall -fPIC `paragui-config --cflags` $(INCLUDES) PROFILERFLAGS = -pg -fprofile-arcs LFLAGS = `paragui-config --libs` OBJECTS = \ @@ -16,16 +17,17 @@ # Important pattern rule for making object files :) %.o: %.cpp %.h - $(CXX) $(CPPFLAGS) -c $< -o $@ + $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@ # Main Target # NOTE: remove the symbolic link so we don't get an errormessage if it already exists # TODO: sym. links can't be created under windows! there has to be a better way ;) $(TARGET): $(OBJECTS) - $(CXX) -g -shared -Wl,-soname,libflcommon.so $(OBJECTS) -o $(TARGET) -lc - -rm -f libflcommon.so - -ln -s libflcommon.so.0.1.0 libflcommon.so + $(CXX) -shared -Wl,-soname,libflcommon.so.0 $(OBJECTS) -o $(TARGET) -lc + -rm -f libflcommon.so.0 libflcommon.so + -ln -s libflcommon.so.0.1.0 libflcommon.so.0 + -ln -s libflcommon.so.0 libflcommon.so clean: -rm -f $(OBJECTS) $(TARGET) *.da *~ libflcommon.so --- freelords/src/graphic/Makefile~ Wed Sep 18 16:31:46 2002 +++ freelords/src/graphic/Makefile Wed Sep 18 16:31:46 2002 @@ -1,8 +1,9 @@ # Makefile for src/graphics CXX = g++ +CXXFLAGS = -O2 -g INCLUDES = -I../common -I. -CPPFLAGS = -g -Wall -Werror -fPIC `paragui-config --cflags` $(INCLUDES) +CPPFLAGS = -Wall -fPIC `paragui-config --cflags` $(INCLUDES) PROFILERFLAGS = -pg -fprofile-arcs LFLAGS = `paragui-config --libs` OBJECTS = \ @@ -17,16 +18,17 @@ # Important pattern rule for making object files :) %.o: %.cpp %.h - $(CXX) $(CPPFLAGS) -c $< -o $@ + $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@ # Main Target # NOTE: remove the symbolic link so that we don't get an errormessage if it already exists # TODO: this can't be done on MS Windows, there has to be another way ;) $(TARGET): $(OBJECTS) - $(CXX) -g -shared -Wl,-soname,libflgraphic.so $(OBJECTS) -o $(TARGET) -lc - -rm -f libflgraphic.so - -ln -s libflgraphic.so.0.1.0 libflgraphic.so + $(CXX) -shared -Wl,-soname,libflgraphic.so.0.1.0 $(OBJECTS) -o $(TARGET) -lc + -rm -f libflgraphic.so libflgraphic.so.0 + -ln -s libflgraphic.so.0.1.0 libflgraphic.so.0 + -ln -s libflgraphic.so.0 libflgraphic.so clean: -rm -f $(OBJECTS) $(TARGET) *.da *~ libflgraphic.so