File: makeapp.wm5

package info (click to toggle)
libwildmagic 5.17%2Bcleaned1-7
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 90,124 kB
  • sloc: cpp: 215,940; csh: 637; sh: 91; makefile: 40
file content (30 lines) | stat: -rw-r--r-- 712 bytes parent folder | download | duplicates (12)
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
CFG ?= Debug

CC := /usr/bin/g++
CFLAGS := -c -D__LINUX__ -DWM5_USE_OPENGL

ifeq (Debug,$(findstring Debug,$(CFG)))
CFLAGS += -g -D_DEBUG
else
CFLAGS += -O2 -DNDEBUG
endif

INCPATH := -I ../../SDK/Include
SRC := $(notdir $(wildcard *.cpp))
OBJ := $(SRC:%.cpp=$(CFG)/%.o)
LIBPATH := -L ../../SDK/Library/$(CFG)
WLIBS := -lWm5Applications -lWm5Graphics -lWm5Imagics -lWm5Physics -lWm5Mathematics -lWm5Core
XLIBS := -lX11 -lXext
GLIBS := -lGL -lGLU
LIBS := $(WLIBS) $(XLIBS) $(GLIBS) -lpthread -lm 

build : $(OBJ)
	$(CC) $(LIBPATH) $(OBJ) -o $(APP).$(CFG) $(LIBS)

$(CFG)/%.o : %.cpp
	@mkdir -p $(CFG)
	$(CC) $(CFLAGS) $(INCPATH) $< -o $@

clean :
	rm -rf $(CFG)
	rm -f $(APP).$(CFG)