$NetBSD: patch-aa,v 1.8 2019/09/06 08:46:26 nros Exp $ * only build lib and use the right x11 include and link directories --- Makefile.orig 2015-10-26 10:22:55.000000000 +0000 +++ Makefile @@ -61,7 +61,7 @@ HAVE_XPM=1 ifeq ($(OS),IRIX) SUBDIRS= lib http else -SUBDIRS= lib http examples tools +SUBDIRS= lib # http examples tools endif # some common definitions @@ -99,9 +99,10 @@ endif # Compiler Settings # # # ##################### -CC = gcc -CFLAGS = -funroll-loops -Wall -pipe -ansi -fPIC $(OS_CFLAGS) $(EXTRA_CFLAGS) -LDFLAGS = +# Inherit from build environment +#CC = gcc +#CFLAGS = -funroll-loops -Wall -pipe -ansi -fPIC $(OS_CFLAGS) $(EXTRA_CFLAGS) +#LDFLAGS = # The following flags are *very* usefull if you are getting unresolved # references to functions in libraries that you *know* to exist. @@ -159,8 +160,8 @@ endif # HAVE_LIBPNG => png.h and zlib.h # HAVE_LIBZ => zlib.h -ZLIBINC = -IMAGEINCLUDES = $(ZLIBINC) +ZLIBINC = +IMAGEINCLUDES = -I${LOCALBASE}/include $(ZLIBINC) # Image libraries # No need to add -lXpm if you need to include it with LIBS below @@ -211,7 +212,7 @@ IMAGELIBS = -ljpeg -lpng $(ZLIBLIB) # Add -DDEBUG to enable selective debug output (see the file DEBUGGING for more # info). # -CPPFLAGS = -D_GNU_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DHAVE_REGEX_H \ +CPPFLAGS = -DHAVE_REGEX_H \ $(EXTRA_CPPFLAGS) \ $(IMAGEDEFINES) \ $(XFT_DEFINES) @@ -224,7 +225,7 @@ ifeq ($(TOOLKIT),Motif) ifeq ($(OS),IRIX) TOOLKITINC=-I../../include/XmHTML -I/usr/include else -TOOLKITINC=-I../../include/XmHTML -I/usr/X11R6/include -I/usr/include/freetype2 +TOOLKITINC=-I../../include/XmHTML -I${X11BSE}/include -I/usr/include/freetype2 endif else ifeq ($(TOOLKIT),gtk) @@ -250,7 +251,7 @@ ifeq ($(TOOLKIT),Motif) ifeq ($(OS),IRIX) LIBDIR = -L/usr/lib32 else -LIBDIR = -L/usr/X11R6/lib +LIBDIR = -L${X11BASE}/lib endif # This is what is required under Linux (Motif 2.0.1). # Your mileage may vary.