aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits/irrlicht/files/patch-source-Irrlicht_Makefile
blob: 46cf4016ac93e50ceb9a1ce3d2d4f1b70d2e0e59 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
--- source/Irrlicht/Makefile    2013-10-01 14:38:36.000000000 -0500
+++ source/Irrlicht/Makefile    2013-10-01 14:45:15.000000000 -0500
@@ -2,7 +2,7 @@
 VERSION_MINOR = 8
 VERSION_RELEASE = 0
 # Irrlicht Engine 1.8.0
-# Makefile for Linux
+# Makefile for Linux/FreeBSD
 #
 # To use, just run:
 #
@@ -56,23 +56,22 @@
 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
+CXXFLAGS += 
 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 +82,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 = ${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 -lpng -ljpeg -lbz2
+staticlib sharedlib: CXXINCS += -I${LOCALBASE}/include
 
 #OSX specific options
 staticlib_osx sharedlib_osx install_osx: SYSTEM = MacOSX
@@ -117,13 +116,13 @@
 
 ####################
 # All target, builds Irrlicht as static lib (libIrrlicht.a) and copies it into lib/Linux
-all linux: staticlib
+all linux: staticlib sharedlib
 
 # Builds Irrlicht as shared lib (libIrrlicht.so.versionNumber) and copies it into lib/Linux
 sharedlib: $(LINKOBJ)
-   $(CXX) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(SONAME) -o $(SHARED_FULLNAME) $^ $(LDFLAGS)
+   $(CXX) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(SHARED_LIB).$(SHLIB_VER) -o $(SHARED_LIB).$(SHLIB_VER) $^ $(LDFLAGS)
    mkdir -p $(LIB_PATH)
-   cp $(SHARED_FULLNAME) $(LIB_PATH)
+   cp $(SHARED_LIB).$(SHLIB_VER) $(LIB_PATH)
 
 # Builds Irrlicht as static lib (libIrrlicht.a)
 $(STATIC_LIB): $(LINKOBJ)