Index: Makefile =================================================================== --- Makefile (revision 0) +++ Makefile (revision 0) @@ -0,0 +1,8 @@ + + +all: + make -f Makefile.osx -C src all + +install: + make -f Makefile.osx -C src install + --- src/Makefile.osx +++ src/Makefile.osx @@ -11,10 +11,13 @@ #LFLAGS = -arch i386 -arch x86_64 #OUT_DIR = ../lib/debug +PREFIX = /usr/local +DESTDIR = + #BASE = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks CXX = gcc CXXFLAGS = $(CXXCFG) -Wall -fPIC -fno-strict-aliasing -D_MACOSX -ObjC++ -D__PLACEMENT_NEW_INLINE -INCPATH = -I../include -I/usr/local/include -I/usr/X11R6/include -I/usr/include +INCPATH = -I../include -I/usr/include -I$(BASE)/OpenGL.framework/Headers/ -I$(BASE)/GLUT.framework/Headers/ -I$(BASE)/AppKit.framework/Headers/^ #-I$(BASE)/OpenGL.framework/Headers/ -I$(BASE)/GLUT.framework/Headers/ -I$(BASE)/AppKit.framework/Headers/ LINK = gcc #LIBS = -L/usr/X11R6/lib -L. -lglfw -lGL -lGLU -lX11 -lXxf86vm -lXext -lpthread -lm @@ -61,10 +64,15 @@ # @echo "==== Make dependencies =====" # makedepend -Y # makedepend -a -Y -- $(CXXFLAGS) $(INCPATH) -- $(SRC_FILES) $(NO_STDERR) +install: $(TARGET) Makefile + mkdir -p $(DESTDIR)$(PREFIX)/lib/ + $(COPY) $(OUT_DIR)/lib$(TARGET)$(SO_EXT) $(DESTDIR)$(PREFIX)/lib/ + mkdir -p $(DESTDIR)$(PREFIX)/include/ + $(COPY) ../include/AntTweakBar.h $(DESTDIR)$(PREFIX)/include/ $(TARGET): $(OBJS) @echo "===== Link $@ =====" - $(LINK) $(LFLAGS) -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o $(OUT_DIR)/lib$(TARGET)$(SO_EXT) $(OBJS) $(LIBS) + $(LINK) $(LFLAGS) -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o $(OUT_DIR)/lib$(TARGET)$(SO_EXT) $(OBJS) $(LIBS) -install_name $(PREFIX)/lib/lib$(TARGET)$(SO_EXT) .cpp.o: @echo "===== Compile $< ====="