111 lines
4.5 KiB
Plaintext
111 lines
4.5 KiB
Plaintext
$OpenBSD: patch-makefile,v 1.2 2002/07/20 00:21:22 pvalchev Exp $
|
|
|
|
Respects CFLAGS and CC.
|
|
Use local zlib, not the supplied one.
|
|
Use an external (and more recent) libpng, not the supplied one.
|
|
|
|
--- makefile.orig Sun Nov 21 18:12:37 1999
|
|
+++ makefile Fri Jul 19 17:42:28 2002
|
|
@@ -44,6 +44,7 @@
|
|
#
|
|
#
|
|
# CFLAGS = -O2 -ansi -c -DCOMPILER_VER=\".`uname`.$(CC)\" $(SRCINC) $(LIBPNGINC) $(ZLIBINC) $(XLIBINC)
|
|
+CFLAGS += $(LIBPNGINC)
|
|
LFLAGS = $(LIBPNGLIB) $(ZLIBLIB) -lm
|
|
|
|
# Linux compiler flags, generic
|
|
@@ -53,7 +54,10 @@ LFLAGS = $(LIBPNGLIB) $(ZLIBLIB) -l
|
|
#CFLAGS = -O6 -finline-functions -ffast-math -c -ansi -m386 -DCPU=586 -DCOMPILER_VER=\".`uname`.$(CC)\" -DPOV_LIB_DIR=\"$(POVLIBDIR)\" $(SRCINC) $(LIBPNGINC) $(ZLIBINC)
|
|
|
|
# Linux compiler flags, Pentium II optimized
|
|
-CFLAGS = -O6 -finline-functions -ffast-math -c -ansi -m386 -DCPU=686 -DCOMPILER_VER=\".`uname`.$(CC)\" -DPOV_LIB_DIR=\"$(POVLIBDIR)\" $(SRCINC) $(LIBPNGINC) $(ZLIBINC)
|
|
+#CFLAGS = -O6 -finline-functions -ffast-math -c -ansi -m386 -DCPU=686 -DCOMPILER_VER=\".`uname`.$(CC)\" -DPOV_LIB_DIR=\"$(POVLIBDIR)\" $(SRCINC) $(LIBPNGINC) $(ZLIBINC)
|
|
+
|
|
+# suitable for an OpenBSD port
|
|
+CFLAGS += -c -DCOMPILER_VER=\".`uname`.$(CC)\" -DPOV_LIB_DIR=\"$(POVLIBDIR)\" $(SRCINC) -I$(LOCALBASE)/include
|
|
|
|
# HPUX compiler flags
|
|
#CFLAGS = +O2 -finline-functions -c -Aa -D_HPUX_SOURCE -DCOMPILER_VER=\".`uname`.$(CC)\" $(SRCINC) $(LIBPNGINC) $(ZLIBINC)
|
|
@@ -62,7 +66,7 @@ CFLAGS = -O6 -finline-functions -ff
|
|
#CFLAGS = -O2 -n32 -mips4 -r10000 -ansi -c -DCOMPILER_VER=\".`uname`.$(CC)\" $(SRCINC) $(LIBPNGINC) $(ZLIBINC) $(XLIBINC)
|
|
|
|
# Your compiler
|
|
-CC = gcc
|
|
+#CC = gcc # passed by the ports infrastructure
|
|
|
|
# The X11 variable should point to the top-level directory where the X11
|
|
# libraries and include files are located. It should really be set in
|
|
@@ -78,7 +82,7 @@ CC = gcc
|
|
# for some AIX systems:
|
|
#X11 = /usr/lpp/X11
|
|
|
|
-X11 = /usr/X11R6
|
|
+X11 = $(X11BASE)
|
|
|
|
# You probably won't need to change these if you have the X11 variable
|
|
# above set properly...
|
|
@@ -90,10 +94,9 @@ XLIBLIB = -L$(X11)/lib -lX11
|
|
# Use libXXX.a if you want to force static linking of the libraries.
|
|
# Use -Llibdir -lXXX if you want to use shared libraries (if they are
|
|
# available). It doesn't matter if you only have libXXX.a libraries.
|
|
-PNGDIR = $(SRCDIR)/libpng
|
|
-LIBPNGINC = -I$(PNGDIR)
|
|
+LIBPNGINC = -I$(LOCALBASE)/include/libpng
|
|
#LIBPNGLIB = $(PNGDIR)/libpng.a
|
|
-LIBPNGLIB = -L$(PNGDIR) -lpng
|
|
+LIBPNGLIB = -L$(LOCALBASE)/lib -lpng
|
|
#LIBPNGLIB = -L/usr/local/lib -lpng
|
|
|
|
# The following options are added at the suggestion of Axel Hecht
|
|
@@ -103,11 +106,7 @@ LIBPNGLIB = -L$(PNGDIR) -lpng
|
|
# LIBPNGINC = -I$(LIBPNGINCDIR)
|
|
# LIBPNGLIB = -L$(PREFIX)/lib -lpng
|
|
|
|
-ZLIBDIR = $(SRCDIR)/zlib
|
|
-ZLIBINC = -I$(ZLIBDIR)
|
|
-#ZLIBLIB = $(ZLIBDIR)/libz.a
|
|
-ZLIBLIB = -L$(ZLIBDIR) -lz
|
|
-#ZLIBLIB = -L/usr/local/lib -lz
|
|
+ZLIBLIB = -lz
|
|
|
|
# The following options are added at the suggestion of Axel Hecht
|
|
# PREFIX = $HOME
|
|
@@ -129,12 +128,12 @@ default: xwin
|
|
#default: svga
|
|
|
|
# Define the default POV-Ray library location
|
|
-POVLIBDIR = /usr/local/lib/povray31
|
|
+POVLIBDIR = $(PREFIX)/share/povray31
|
|
|
|
# Define the path under which you want POV-Ray files to be installed,
|
|
# typically /usr/local/bin, though Linux distributions may wish to
|
|
# alter this to /usr/bin
|
|
-POVPATH = /usr/local
|
|
+POVPATH = $(PREFIX)
|
|
|
|
#----------------------------------------------------------------------
|
|
# There should be no compelling reason to customize the makefile beyond
|
|
@@ -1013,22 +1012,6 @@ planesDEP = $(SRCDIR)/plan
|
|
$(SRCDIR)/povray.h \
|
|
$(SRCDIR)/render.h \
|
|
$(SRCDIR)/vector.h \
|
|
- $(SRCDIR)/vlbuffer.h \
|
|
- $(SRCDIR)/warps.h
|
|
-
|
|
-png_povDEP = $(SRCDIR)/png_pov.c \
|
|
- $(SRCDIR)/atmosph.h \
|
|
- $(SRCDIR)/bbox.h \
|
|
- $(SRCDIR)/camera.h \
|
|
- config.h \
|
|
- $(SRCDIR)/frame.h \
|
|
- $(SRCDIR)/optout.h \
|
|
- $(PNGDIR)/png.h \
|
|
- $(SRCDIR)/png_pov.h \
|
|
- $(SRCDIR)/point.h \
|
|
- $(SRCDIR)/povproto.h \
|
|
- $(SRCDIR)/povray.h \
|
|
- $(SRCDIR)/render.h \
|
|
$(SRCDIR)/vlbuffer.h \
|
|
$(SRCDIR)/warps.h
|
|
|