source: Swollen/swollen/Makefile @ 317

Last change on this file since 317 was 125, checked in by darran, 19 years ago
  • adding -movie ability ...
File size: 1.7 KB
Line 
1
2#
3#  Mac OS X Makefile
4#
5
6TOPDIR           =  ..
7
8#OPTIMIZATION     =  -O2
9OPTIMIZATION     =  -g
10
11OSG_INCLUDE      =  ${OSGHOME}/include
12LOCAL_INCLUDE    =  $(TOPDIR)/include
13INCLUDES         =  -I . -I $(LOCAL_INCLUDE) -I $(OSG_INCLUDE) -I/usr/X11R6/include
14
15CARBON_LIB       =  -framework Carbon
16GL_LIBS          =  -framework OpenGL
17X_LIBS           =  -lX11
18OTHER_LIBS       =  -lm -lstdc++
19LIBS            +=  -losg -losgText -losgProducer -losgDB -losgUtil -losgGA \
20                    -lOpenThreads -lProducer -lSWWReader \
21                    $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) $(CARBON_LIB)
22LIBDIRS          =  -L/usr/lib -L/usr/X11R6/lib -L/sw/lib -L/usr/local/lib -L$(TOPDIR)/bin
23
24NAME             =  swollen
25TARGETDIR        =  $(TOPDIR)/bin
26TARGET           =  $(TARGETDIR)/$(NAME)
27
28COMPILER         =  g++
29OBJ              =  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
33CPPFLAGS         =  -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
49version.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
55clean :
56        rm -f *.o *~ $(TARGET)
57
Note: See TracBrowser for help on using the repository browser.