$NetBSD: patch-aa,v 1.9 2014/10/10 20:57:32 snj Exp $ Override hardcoded paths/flags. --- Makefile.orig 2013-12-19 16:50:37.000000000 -0800 +++ Makefile 2014-10-10 12:42:15.000000000 -0700 @@ -4,7 +4,7 @@ ####################################################################### # Directory where qiv will be installed under. -PREFIX = /usr/local +#PREFIX = /usr/local # Font to use for statusbar in fullscreen mode STATUSBAR_FONT = "Monospace 9" @@ -49,15 +49,6 @@ EXIF = -DHAVE_EXIF # Do not edit below here! ###################################################################### -CC = gcc -#CFLAGS = -O0 -g -Wall -CFLAGS = -O2 -Wall \ - -fcaller-saves -ffast-math -fno-strength-reduce \ - -fthread-jumps #-march=pentium #-DSTAT_MACROS_BROKEN -#CFLAGS = -O2 -Wall -fomit-frame-pointer -finline-functions \ -# -fcaller-saves -ffast-math -fno-strength-reduce \ -# -fthread-jumps #-march=pentium #-DSTAT_MACROS_BROKEN - INCLUDES := $(shell pkg-config --cflags gdk-2.0 imlib2) LIBS := $(shell pkg-config --libs gdk-2.0 imlib2) -lX11 -lXext @@ -110,10 +101,10 @@ DEFINES_G = $(DEFINES) -DDEBUG all: $(PROGRAM) $(PROGRAM): $(OBJS) - $(CC) $(CFLAGS) $(DEFINES) $(OBJS) $(LIBS) -o $(PROGRAM) + $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM) $(OBJS): %.o: %.c $(HEADERS) - $(CC) -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o $@ + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o $@ main.o: main.h @@ -137,32 +128,11 @@ distclean : clean rm -f $(PROGRAM) $(PROGRAM_G) install: $(PROGRAM) - @echo "Installing QIV..." - @if [ ! -e $(PREFIX)/bin ]; then \ - install -d -m 0755 $(PREFIX)/bin; \ - echo install -d -m 0755 $(PREFIX)/bin; \ - fi - install -s -m 0755 $(PROGRAM) $(PREFIX)/bin - @if [ ! -e $(PREFIX)/man/man1 ]; then \ - echo install -d -m 0755 $(PREFIX)/man/man1; \ - install -d -m 0755 $(PREFIX)/man/man1; \ - fi - install -m 0644 $(PROGRAM).1 $(PREFIX)/man/man1 - $(COMPRESS_PROG) $(PREFIX)/man/man1/$(PROGRAM).1 - @if [ ! -e $(PREFIX)/share/pixmaps ]; then \ - echo install -d -m 0755 $(PREFIX)/share/pixmaps; \ - install -d -m 0755 $(PREFIX)/share/pixmaps; \ - fi - install -m 0644 qiv.png $(PREFIX)/share/pixmaps/qiv.png - @if [ ! -e $(PREFIX)/share/applications ]; then \ - echo install -d -m 0755 $(PREFIX)/share/applications; \ - install -d -m 0755 $(PREFIX)/share/applications; \ - fi - install -m 0644 qiv.desktop $(PREFIX)/share/applications/qiv.desktop - @if ./qiv -f ./intro.jpg ; \ - then echo "-- Test Passed --" ; \ - else echo "-- Test Failed --" ; \ - fi - @echo "\nDont forget to look into the \"qiv-command\" file and install it!\n-> cp qiv-command.example $(PREFIX)/bin/qiv-command\n\n" + $(BSD_INSTALL_PROGRAM) $(PROGRAM) $(DESTDIR)$(PREFIX)/bin + $(BSD_INSTALL_DATA) $(PROGRAM).1 $(DESTDIR)$(PREFIX)/man/man1 + $(BSD_INSTALL_DATA) qiv.png $(DESTDIR)$(PREFIX)/share/pixmaps + $(BSD_INSTALL_DATA) qiv.desktop $(DESTDIR)$(PREFIX)/share/applications + $(BSD_INSTALL_SCRIPT) contrib/qiv-command.example \ + $(DESTDIR)$(PREFIX)/share/examples/qiv # the end... ;-)