freebsd-ports/x11-toolkits/irrlicht/files/patch-source-Irrlicht_Makefile
Tijl Coosemans 2f49d6ba56 - In x11-toolkits/irrlicht build only the shared library. The upstream
Makefile does not support building both the static and shared library.
  It compiles the code without -fPIC first for the static library and then
  creates the shared library from the same object files without recompiling
  them with -fPIC.
- The upstream install target can now be used as well.
- Use upstream library version and bump dependent ports.
2017-02-15 19:40:16 +00:00

46 lines
1.6 KiB
Text

--- source/Irrlicht/Makefile.orig 2014-10-18 07:47:20 UTC
+++ source/Irrlicht/Makefile
@@ -56,23 +56,20 @@
EXTRAOBJ =
LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \
$(IRRVIDEOOBJ) $(IRRSWRENDEROBJ) $(IRRIOOBJ) $(IRROTHEROBJ) \
- $(IRRGUIOBJ) $(ZLIBOBJ) $(JPEGLIBOBJ) $(LIBPNGOBJ) $(LIBAESGM) \
+ $(IRRGUIOBJ) $(LIBAESGM) \
$(BZIP2OBJ) $(EXTRAOBJ)
###############
#Compiler flags
-CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng
+CXXINCS = -I../../include -I${LOCALBASE}/include
CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1
CXXFLAGS += -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing
ifndef NDEBUG
CXXFLAGS += -g -D_DEBUG
-else
-CXXFLAGS += -fexpensive-optimizations -O3
endif
ifdef PROFILE
CXXFLAGS += -pg
endif
-CFLAGS := -O3 -fexpensive-optimizations -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES
sharedlib sharedlib_osx: CXXFLAGS += -fPIC
sharedlib sharedlib_osx: CFLAGS += -fPIC
@@ -83,13 +80,13 @@
endif
#Linux specific options
-staticlib sharedlib install: SYSTEM = Linux
+staticlib sharedlib install: SYSTEM = FreeBSD
STATIC_LIB = libIrrlicht.a
LIB_PATH = ../../lib/$(SYSTEM)
-INSTALL_DIR = /usr/local/lib
+INSTALL_DIR = ${DESTDIR}${PREFIX}/lib
sharedlib install: SHARED_LIB = libIrrlicht.so
-sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm
-staticlib sharedlib: CXXINCS += -I/usr/X11R6/include
+sharedlib: LDFLAGS += -L${LOCALBASE}/lib -lGL -lXxf86vm -lX11 -lpng -ljpeg -lbz2 -lz
+staticlib sharedlib: CXXINCS += -I${LOCALBASE}/include
#OSX specific options
staticlib_osx sharedlib_osx install_osx: SYSTEM = MacOSX