Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F8724180
Makefile
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
Makefile
View Options
CXX = g++
CXXFLAGS=-DFROG_OPENGL -DFROG_ZLIB -DFROG_LIGHTING
CXXFLAGSOPTIM=-O3 -funroll-loops -s
CXXFLAGS+=$(CXXFLAGSOPTIM)
LDFLAGS=
SOTYPE=
SRCDIR = ../src
INCDIR = Includes
LIBDIR = $(shell if [ -n "$(FROGDIR)" ];then echo $(FROGDIR)/soft/Lib;else echo Lib;fi)
RM = rm -f
SHELL = /bin/sh
ARCH=$(shell uname -a)
OS=$(shell uname)
ifeq (Darwin,$(findstring Darwin,$(OS)))
OSDEPENDENT=-Dmacos
FRAMEWORKS=-framework GLUT -lGL -lGLU -framework System
SOTYPE=.dylib
LDFLAGS=-g -prebind -dynamiclib
ifeq (x86_64,$(findstring x86_64,$(ARCH)))
ARCHDEPENDENT=-L$(LIBDIR) -L/usr/X11R6/lib64 -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
else
ARCHDEPENDENT=-L$(LIBDIR) -L/usr/X11R6/lib -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
endif
else
OSDEPENDENT=-Dlinux
SOTYPE=.so
LDFLAGS=-shared -Wl,-soname,
ifeq (x86_64,$(findstring x86_64,$(ARCH)))
LIB=lib64
ARCHDEPENDENT=-L$(LIBDIR) -lglut -L/usr/lib -L/usr/X11/lib64 -L/usr/X11R6/lib64 -lGLU -lGL
else
LIB=lib32
ARCHDEPENDENT=-L$(LIBDIR) -lglut -L/usr/lib -lglut -L/usr/X11/lib -L/usr/X11R6/lib -lGLU -lGL
endif
endif
OBJS = $(LIBDIR)/FROG_Light.o $(LIBDIR)/FROG_Primitives.o $(LIBDIR)/FROG_Geometry.o $(LIBDIR)/FROG_Events.o $(LIBDIR)/FROG_Texture.o $(LIBDIR)/FROG_ReadCards.o $(LIBDIR)/FROG_Camera.o $(LIBDIR)/FROG_Element_Tools.o $(LIBDIR)/FROG_Coord.o $(LIBDIR)/FROG_ZLib.o $(LIBDIR)/GL2PS.o $(LIBDIR)/GLEW.o
all : main.cpp $(LIB) libfrog$(SOTYPE)
$(CXX) -Wall -o frog main.cpp $(CXXFLAGS) $(OSDEPENDENT) $(FRAMEWORKS) $(ARCHDEPENDENT) -lm -lX11 -lfrog -lpng -lz -lcurl -pthread
$(LIBDIR)/%.o : $(SRCDIR)/%.cpp
$(CXX) -c $(CXXFLAGS) $(OSDEPENDENT) $< -fPIC -o $@
$(LIBDIR)/%.o : $(INCDIR)/FROG/%.cpp
$(CXX) -c $(CXXFLAGS) $(OSDEPENDENT) $< -fPIC -o $@
$(LIBDIR)/GL2PS.o : Includes/GL2PS/gl2ps.c
$(CXX) -c $(CXXFLAGS) $(OSDEPENDENT) $< -fPIC -o $@
$(LIBDIR)/GLEW.o : Includes/GL/glew.c
$(CXX) -c $(CXXFLAGS) $(OSDEPENDENT) $< -fPIC -o $@
lib64 :
@echo 'if [ ! -f $(LIBDIR)/libglut.so ];then ln -s /usr/lib64/libglut.so.3 $(LIBDIR)/libglut.so;fi'
@if [ ! -f $(LIBDIR)/libglut.so ];then ln -s /usr/lib64/libglut.so.3 $(LIBDIR)/libglut.so;fi
@echo 'if [ ! -f $(LIBDIR)/libpng.so ];then ln -s /usr/lib64/libpng.so.3 $(LIBDIR)/libpng.so;fi'
@if [ ! -f $(LIBDIR)/libpng.so ];then ln -s /usr/lib64/libpng.so.3 $(LIBDIR)/libpng.so;fi
lib32 :
@echo 'if [ ! -f $(LIBDIR)/libglut.so ];then ln -s /usr/lib/libglut.so.3 $(LIBDIR)/libglut.so;fi'
@if [ ! -f $(LIBDIR)/libglut.so ];then ln -s /usr/lib/libglut.so.3 $(LIBDIR)/libglut.so;fi
@echo 'if [ ! -f $(LIBDIR)/libpng.so ];then ln -s /usr/lib/libpng.so.3 $(LIBDIR)/libpng.so;fi'
@if [ ! -f $(LIBDIR)/libpng.so ];then ln -s /usr/lib/libpng.so.3 $(LIBDIR)/libpng.so;fi
libfrog.dylib : $(OBJS)
$(CXX) $(LDFLAGS) $(OBJS) $(CXXFLAGS) $(OSDEPENDENT) $(FRAMEWORKS) $(ARCHDEPENDENT) -lX11 -lz -lpng -o $(LIBDIR)/$@
libfrog.so : $(OBJS)
$(CXX) $(LDFLAGS)$(LIBDIR)/$@ -o $(LIBDIR)/$@ $(OBJS) -lc
clean :
$(RM) $(LIBDIR)/*.o $(LIBDIR)/*$(SOTYPE)
File Metadata
Details
Attached
Mime Type
text/x-makefile
Expires
Mon, Jan 20, 10:38 PM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4227786
Default Alt Text
Makefile (3 KB)
Attached To
rFROGSVN frogsvn
Event Timeline
Log In to Comment