1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
TARGET = powder
OFILES = linuxmain.o \
../sdl/hamfake.o \
../../action.o \
../../assert.o \
../../ai.o \
../../artifact.o \
../../bmp.o \
../../build.o \
../../buf.o \
../../control.o \
../../creature.o \
../../dpdf_table.o \
../../encyc_support.o \
../../gfxengine.o \
../../grammar.o \
../../hiscore.o \
../../input.o \
../../intrinsic.o \
../../item.o \
../../map.o \
../../mobref.o \
../../msg.o \
../../name.o \
../../piety.o \
../../rand.o \
../../signpost.o \
../../smokestack.o \
../../speed.o \
../../sramstream.o \
../../stylus.o \
../../victory.o \
../../encyclopedia.o \
../../glbdef.o \
../../credits.o \
../../license.o \
../../gfx/all_bitmaps.o \
../../rooms/allrooms.o
PREMAKE = ../../support/map2c/map2c \
../../support/tile2c/tile2c \
../../support/bmp2c/bmp2c \
../../support/encyclopedia2c/encyclopedia2c \
../../support/enummaker/enummaker \
../../support/txt2c/txt2c
all: $(TARGET)
powder: $(OFILES)
$(CXX) -o $(TARGET) $(OFILES) `sdl-config --libs` $(CXXFLAGS) $(LDFLAGS)
.cpp.o:
$(CXX) -DLINUX -I ../../port/sdl `sdl-config --cflags` -c $< -o $@ $(CXXFLAGS)
powder-static: premake $(OFILES)
# This extra step is from:
# http://www.trilithium.com/johan/2005/06/static-libstdc/
# and is to try and ensure we end up with a static link
# of stdc++.
$(RM) libstdc++.a
ln -s `$(CXX) -print-file-name=libstdc++.a`
$(CXX) -static-libgcc -L. -o $(TARGET) $(OFILES) `sdl-config --libs` $(CXXFLAGS) $(LDFLAGS)
clean:
$(RM) $(OFILES)
$(RM) $(TARGET)
@for s in $$( echo "$(PREMAKE)" | tr -s '' '\n'); do \
$(MAKE) clean -C `dirname $$s`; \
done;
$(PREMAKE):
$(MAKE) -C `dirname $@`
premake: $(PREMAKE)
cd ../../rooms ; ./buildrooms.bash
cd ../../gfx ; ./rebuild.sh
cd ../.. ; support/enummaker/enummaker source.txt
cd ../.. ; support/txt2c/txt2c LICENSE.TXT license.cpp
cd ../.. ; support/txt2c/txt2c CREDITS.TXT credits.cpp
cd ../.. ; support/encyclopedia2c/encyclopedia2c encyclopedia.txt
|