-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfastmake
executable file
·64 lines (44 loc) · 1.74 KB
/
fastmake
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
# Configurações dos usuários do makefile. Cada usuário tem um arquivo para trabalhar
# Para correta utilização coloque esses caminhos em um arquivo chamado makefile.conf
PYTHONPATH = /usr/include/python2.7
PANDAPATHINCLUDE = /usr/include/panda3d
PANDAPATHLIB = /usr/lib/panda3d
.SUFFIXES: .c .cpp .cxx .cc .h .hh
# Compiler Names:
C++ = g++
CC = gcc
RANLIB = ranlib
# Flags for C++ compiler:
CFLAGS = -g -Wno-deprecated -fPIC #-O2
CXXFLAGS = -g -Wno-deprecated -Wno-write-strings -fPIC -O3
INCGAME = -Isrc -Isrc/animals -Isrc/animals/predators -Isrc/animals/prey -Isrc/animals/lizards \
-Isrc/cameras -Isrc/gui -Isrc/gui/screen -Isrc/gui/screen/menu -Isrc/gui/screen/inGame -Isrc/base \
-Isrc/gui/hint -Isrc/gui/widgets -Isrc/vegetation -Isrc/weather -Isrc/world -Isrc/player -Isrc/gui/editor \
INCFLAGS = -I$(PYTHONPATH) \
-I$(PANDAPATHINCLUDE) \
-I$(INCGAME)
# Libraries to link with:
MATLIB = -lm
GLLIBS = -lGL -lGLU
GLUTLIB = -lglut
GLUILIB = -lglui
OMLIBS = -lOM_CORE -lOM_TOOLS
LIBPANDA = -lp3framework -lpanda -lpandafx -lpandaexpress -lp3dtoolconfig -lp3dtool -lp3pystub #-lpandanspr4
LIBPATH = -L$(PANDAPATHLIB)
LDFLAGS = $(LIBPANDA)
# Simdunas main program build rules
SUBDIRS = fastbuild
INCFLAGS += $(patsubst %,-I%,$(SUBDIRS))
SRC := $(foreach dir,$(SUBDIRS),$(wildcard $(dir)/*.cxx))
HEADERFILES := $(foreach dir,$(SUBDIRS),$(wildcard $(dir)/*.h))
OBJECTFILES := $(patsubst %.cxx,%.o$,$(SRC))
# Targets
all: simdunas
simdunas: $(HEADERFILES) $(OBJECTFILES)
@echo "Linking ...."
$(CXX) $(CPPFLAGS) $(LIBPATH) $(OBJECTFILES) $(LDFLAGS) -o simdunas
.cxx.o: $*.h
@echo "Compiling: " $*
@($(C++) -o $*.o -c $(CXXFLAGS) $(INCFLAGS) $*.cxx)
clean:
rm -f simdunas $(OBJECTFILES)