| 1 |
ifeq ($(CXXFLAGS),) |
| 2 |
CXXFLAGS=-O3 |
| 3 |
endif |
| 4 |
|
| 5 |
.cpp.o: |
| 6 |
$(CXX) -DLINUX -I ../../port/sdl `sdl-config --cflags` -c $< -o $@ $(CXXFLAGS) |
| 7 |
|
| 8 |
all: $(TARGET) |
| 9 |
|
| 10 |
$(TARGET): $(OFILES) |
| 11 |
# This extra step is from: |
| 12 |
# http://www.trilithium.com/johan/2005/06/static-libstdc/ |
| 13 |
# and is to try and ensure we end up with a static link |
| 14 |
# of stdc++. |
| 15 |
$(RM) libstdc++.a |
| 16 |
ln -s `$(CXX) -print-file-name=libstdc++.a` |
| 17 |
$(CXX) -static-libgcc -L. -o $(TARGET) $(OFILES) `sdl-config --libs` $(CXXFLAGS) $(LDFLAGS) |
| 18 |
|
| 19 |
clean: |
| 20 |
$(RM) $(OFILES) |
| 21 |
$(RM) $(TARGET) |