1 src = src/sumhack.cpp src/events.cpp
4 include src/parts/Makefile-part
5 #include src/sdlvf/Makefile-part
7 obj = $(src:.cpp=.o) $(csrc:.c=.o)
12 incdir = -Isrc/3dengfx/src -Ilibs -Ilibs/png -Ilibs/jpeglib -Ilibs/ogg -Ilibs/vorbis
13 CXXFLAGS = -ansi -pedantic -Wall $(opt) $(dbg) $(incdir) -MMD $(def)
14 CFLAGS = -std=c89 -pedantic -Wall $(opt) $(dbg) $(incdir) -MMD $(def)
15 libs = $(libdir) $(libsys) src/3dengfx/lib3dengfx.a $(libgl) \
16 -lvorbis -logg -ljpeg -lpng -lz -l3ds $(libc)
18 sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/')
20 obj = $(src:.cpp=.w32.o) $(csrc:.c=.w32.o)
21 bin = sumhack-thelab.exe
23 libgl = -lopengl32 -lglut32
24 libsys = -lmingw32 -lgdi32 -mconsole
34 $(bin): $(obj) 3dengfx libs
35 $(CXX) -o $@ $(obj) $(libs)
38 $(CC) -o $@ $(CFLAGS) -c $<
41 $(CXX) -o $@ $(CXXFLAGS) -c $<
45 $(MAKE) -C src/3dengfx
49 $(MAKE) -C src/3dengfx clean
58 clean-all: clean 3dengfx-clean cleandep clean-libs
74 $(MAKE) CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ sys=mingw
78 $(MAKE) CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ sys=mingw -C libs
82 $(MAKE) CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ sys=mingw clean
84 .PHONY: cross-clean-libs
86 $(MAKE) CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ sys=mingw -C libs clean