Line | |
---|
1 | |
---|
2 | # |
---|
3 | # Mac OS X Makefile |
---|
4 | # |
---|
5 | |
---|
6 | TOPDIR = .. |
---|
7 | |
---|
8 | #OPTIMIZATION = -O2 |
---|
9 | OPTIMIZATION = -g |
---|
10 | |
---|
11 | OSG_INCLUDE = ${OSGHOME}/include |
---|
12 | LOCAL_INCLUDE = $(TOPDIR)/include |
---|
13 | INCLUDES = -I . -I $(LOCAL_INCLUDE) -I $(OSG_INCLUDE) -I/usr/X11R6/include |
---|
14 | |
---|
15 | CARBON_LIB = -framework Carbon |
---|
16 | GL_LIBS = -framework OpenGL |
---|
17 | X_LIBS = -lX11 |
---|
18 | OTHER_LIBS = -lm -lstdc++ |
---|
19 | LIBS += -losg -losgText -losgProducer -losgDB -losgUtil -losgGA \ |
---|
20 | -lOpenThreads -lProducer -lSWWReader \ |
---|
21 | $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) $(CARBON_LIB) |
---|
22 | LIBDIRS = -L/usr/lib -L/usr/X11R6/lib -L/sw/lib -L/usr/local/lib -L$(TOPDIR)/bin |
---|
23 | |
---|
24 | NAME = swollen |
---|
25 | TARGETDIR = $(TOPDIR)/bin |
---|
26 | TARGET = $(TARGETDIR)/$(NAME) |
---|
27 | |
---|
28 | COMPILER = g++ |
---|
29 | OBJ = customviewer.o hud.o keyboardeventhandler.o watersurface.o main.o version.o \ |
---|
30 | bedslope.o createSky.o customtrackball.o customterrainmanipulator.o spotlight.o \ |
---|
31 | directionallight.o state.o customviewereventhandler.o customargumentparser.o \ |
---|
32 | animation.o |
---|
33 | CPPFLAGS = -F/System/Library/Frameworks -Wall -DDARWIN_QUICKTIME \ |
---|
34 | $(OPTIMIZATION) |
---|
35 | |
---|
36 | |
---|
37 | |
---|
38 | %.o : %.cpp |
---|
39 | $(COMPILER) -c $(INCLUDES) $(CPPFLAGS) $< -o $@ |
---|
40 | |
---|
41 | |
---|
42 | $(TARGET) : $(OBJ) |
---|
43 | g++ $(CPPFLAGS) $(LIBDIRS) $(OBJ) $(LIBS) -o $(TARGET) |
---|
44 | |
---|
45 | |
---|
46 | .PHONY : version.cpp |
---|
47 | |
---|
48 | # on every build, recreate version() string based on SVN revision number |
---|
49 | version.cpp: |
---|
50 | echo -n 'const char* version() { const char* s = "Revision: ' > version.cpp |
---|
51 | svnversion -n . >> version.cpp |
---|
52 | echo '"; return s; }' >> version.cpp |
---|
53 | |
---|
54 | |
---|
55 | clean : |
---|
56 | rm -f *.o *~ $(TARGET) |
---|
57 | |
---|
Note: See
TracBrowser
for help on using the repository browser.