summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile73
1 files changed, 73 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..a2af1cc
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,73 @@
+os=$(shell uname -s)
+
+ifeq ($(os),Darwin)
+IVY_PATH := $(HOME)/src-ext/ivy-c-3.6/src
+CPPFLAGS= -MMD -I$(IVY_PATH)
+DSO_EXT=.dylib
+LD=g++ -dynamiclib -single_module
+LDFLAGS=-L$(IVY_PATH) -L/sw/lib -framework OpenGL -framework AGL -framework Carbon
+else
+CPPFLAGS= -MMD -I/usr/X11R6/include
+DSO_EXT=.so
+LD=g++ -shared
+LDFLAGS=
+endif
+
+
+CXXFILES := Ivy.cxx IvyApplication.cxx
+OBJECTS := $(CXXFILES:.cxx=.o)
+DEPS := $(CXXFILES:.cxx=.d)
+
+CXXFILES_GLFW := Ivy_glfw.cxx IvyApplication.cxx
+OBJECTS_GLFW := $(CXXFILES_GLFW:.cxx=.o)
+DEPS_GLFW := $(CXXFILES_GLFW:.cxx=.d)
+
+
+LD_QUICKSTART_INFO=
+GCXXINCS=
+LIBIVY = libIvy.a
+LIBIVY_GLFW = libIvy_glfw.a
+PERHAPS64= `uname -m | perl -ne "print /64/ ? '64' : '';"`
+
+ifeq ($(PERHAPS64), '64')
+ XTLIB = -L/usr/X11R6/lib/
+else
+ XTLIB = -L/usr/X11R6/lib64/
+endif
+
+#a mettre dans les makefiles generant les executables
+#LLDLIBS= -rpath. -L. -lTextureLabel -lInventor -lInventorXt -lXm -lXt -lttf -lGL -lGLU -lm
+
+
+ifdef DEBUG
+CC= g++ -fPIC -g -Wall -pg $(CPPFLAGS)
+else
+CC= g++ -fPIC -O2 -Wall $(CPPFLAGS)
+endif
+
+default: $(LIBIVY) $(LIBIVY_GLFW)
+
+%.o: %.cxx
+ $(CC) -c $<
+
+$(LIBIVY) : $(OBJECTS)
+ ar rv $(LIBIVY) $(OBJECTS)
+ ranlib $(LIBIVY)
+
+$(LIBIVY_GLFW) : $(OBJECTS_GLFW)
+ ar rv $(LIBIVY_GLFW) $(OBJECTS_GLFW)
+ ranlib $(LIBIVY_GLFW)
+
+
+
+LLDLIBS = -L $(XTLIB) -Wl,-rpath,$(XTLIB) -L. -Wl,-rpath,. -L$(IVY_PATH)/src
+
+testIvy : testIvy.cxx
+ g++ -g $(LDFLAGS) $(LLDLIBS) -o $@ testIvy.cxx -lIvy -lxtivy -lXt -lX11
+
+
+clean :
+ /bin/rm -f *$(DSO_EXT) $(OBJECTS) $(LIBIVY) $(DEPS) \
+ $(OBJECTS_GLFW) $(LIBIVY_GLFW) $(DEPS_GLFW) core *.o *.d *~
+
+-include *.d