source: Swollen/swollen/Makefile @ 100

Last change on this file since 100 was 88, checked in by darran, 19 years ago
  • Commented out lighting marker pending removal (not a good paradigm)
  • Commented out "picture in picture" hack
  • compiles against OSG 0.9.9 on OSX, can't get focus on window and doesn't accept keyboard input
File size: 1.6 KB
Line 
1
2#
3#  Mac OS X Makefile
4#
5
6TOPDIR           =  ..
7
8OPTIMIZATION     =  -O2
9#OPTIMIZATION     =  -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
32CPPFLAGS         =  -F/System/Library/Frameworks -Wall -DDARWIN_QUICKTIME \
33                    $(OPTIMIZATION)
34
35
36
37%.o : %.cpp
38        $(COMPILER) -c $(INCLUDES) $(CPPFLAGS) $< -o $@
39
40
41$(TARGET) : $(OBJ)
42        g++ $(CPPFLAGS) $(LIBDIRS) $(OBJ) $(LIBS) -o $(TARGET)
43
44
45.PHONY : version.cpp
46
47# on every build, recreate version() string based on SVN revision number
48version.cpp:
49        echo -n 'const char* version() { const char* s = "Revision: ' > version.cpp
50        svnversion -n . >> version.cpp
51        echo '"; return s; }' >> version.cpp
52
53
54clean :
55        rm -f *.o *~ $(TARGET)
56
Note: See TracBrowser for help on using the repository browser.