* Replace VideoUpdate DirectX code with OpenGL initialization and a test sprite.
[matthijs/ABM2.git] / ABM2 / Makefile
index 900434e0efd73d132fea2a3fc3e6ca0956e0535f..91782ea944b50e43cbcec24d2d19c84359bace0e 100644 (file)
@@ -1,13 +1,25 @@
-CFLAGS:=-I.
-OBJS:=main.o Engine/Log.o SchemeReader.o Engine/Settings.o Engine/mmanager.o
+MAKE    := make
+CFLAGS  := -I. -DWITH_SDL $(shell pkg-config --cflags ftgl) -g -O0
+LDFLAGS := -lSDL $(shell pkg-config --libs ftgl) -lGL -lGLU -lILUT
+OBJS    := main.o Engine/Log.o SchemeReader.o Engine/Settings.o \
+           Engine/mmanager.o Engine/Kernel.o Engine/ProfileLogHandler.o \
+           Engine/VideoUpdate.o Engine/GlobalTimer.o Engine/SoundTask.o \
+           Engine/profiler.o Playground.o Engine/InputTask.o \
+           Amaltheia/Graphics.o Amaltheia/Sprite.o
 
-all: $(OBJS)
+#include these in linking. Linking with -lftgl doesn't work for some stupid reason...
+EXTRA_OBJS := /usr/lib/libftgl.a
 
-link: all
-       g++ $(OBJS)
+all: abm2
+
+abm2: $(OBJS)
+       g++ $(LDFLAGS) -o abm2 $(OBJS) $(EXTRA_OBJS)
 
 %.o: %.cpp
        g++ $(CFLAGS) -c $< -o $@
 
 clean:
-       rm -f *.o Engine/*.o
+       rm -f *.o Engine/*.o Amaltheia/*.o
+
+less:
+       $(MAKE) 2>&1 | less