Page MenuHomeHEPForge

Makefile
No OneTemporary

Makefile

CXX = g++
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)
ifeq (x86_64,$(findstring x86_64,$(ARCH)))
all: i64
else
all: i32
endif
OBJS = $(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)/GL2PS.o $(LIBDIR)/GLEW.o
i32 : main.cpp libfrog.so
@echo "compilation on a 32bits machine"
@if [ ! -f $(LIBDIR)/libglut32.so ];then ln -s /usr/lib/libglut.so.3 $(LIBDIR)/libglut32.so;fi
@if [ ! -f $(LIBDIR)/libpng32.so ];then ln -s /usr/lib/libpng.so.3 $(LIBDIR)/libpng32.so;fi
$(CXX) -Wall -o frog main.cpp -Dlinux -DFROG_OPENGL -L/usr/X11R6/lib -lGLU -lm -lGL -lX11 -L$(LIBDIR) -lfrog -lglut32 -lpng32 -L/usr/lib -lz -lcurl -pthread
i64 : main.cpp libfrog.so
@echo "compilation on a 64bits machine"
@echo $(LIBDIR)
@if [ ! -f $(LIBDIR)/libglut64.so ];then ln -s /usr/lib64/libglut.so.3 $(LIBDIR)/libglut64.so;fi
@if [ ! -f $(LIBDIR)/libpng64.so ];then ln -s /usr/lib64/libpng.so.3 $(LIBDIR)/libpng64.so;fi
$(CXX) -Wall -o frog main.cpp -Dlinux -DFROG_OPENGL -L/usr/X11R6/lib64 -lGLU -lm -lGL -lX11 -L$(LIBDIR) -lfrog -lglut64 -lpng64 -L/usr/lib64 -lz -lcurl -pthread
$(LIBDIR)/%.o : $(SRCDIR)/%.cpp
$(CXX) -c -Dlinux -DFROG_OPENGL $< -fPIC -o $@
$(LIBDIR)/%.o : $(INCDIR)/FROG/%.cpp
$(CXX) -c -Dlinux -DFROG_OPENGL $< -fPIC -o $@
$(LIBDIR)/GL2PS.o : Includes/GL2PS/gl2ps.c
$(CXX) -c -Dlinux -DFROG_OPENGL $< -fPIC -o $@
$(LIBDIR)/GLEW.o : Includes/GL/glew.c
$(CXX) -c -Dlinux -DFROG_OPENGL $< -fPIC -o $@
libfrog.so : $(OBJS)
$(CXX) -shared -Wl,-soname,$(LIBDIR)/$@ -o $(LIBDIR)/$@ $(OBJS) -lc
clean :
$(RM) $(LIBDIR)/*.o $(LIBDIR)/*.so

File Metadata

Mime Type
text/x-makefile
Expires
Sat, Dec 21, 1:12 PM (1 d, 1 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3948804
Default Alt Text
Makefile (1 KB)

Event Timeline