From 26f1cb9fd60aff4397bb1119348f336f7285317a Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Mon, 5 Sep 2016 21:33:03 +0200 Subject: [PATCH] Put LDFLAGS at end of compile command Pointed out by Logan Rosen. --- Makefile | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 9804676..4bbcc6e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,8 @@ srcdir = . +prefix = /usr/local +exec_prefix=$(prefix) +bindir=$(exec_prefix)/bin +datadir=$(prefix)/share CC?=gcc CFLAGS?= -O2 -s @@ -10,13 +14,13 @@ ALL= uci2wb uci2wb.6.gz all: ${ALL} uci2wb: UCI2WB.c - $(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) UCI2WB.c -o uci2wb + $(CC) $(CFLAGS) $(CPPFLAGS) UCI2WB.c -o uci2wb $(LDFLAGS) install: ${ALL} - install -d -m0755 $(DESTDIR)/usr/games - cp -u ${srcdir}/uci2wb $(DESTDIR)/usr/games - install -d -m0755 $(DESTDIR)/usr/share/man/man6 - cp -u ${srcdir}/uci2wb.6.gz $(DESTDIR)/usr/share/man/man6 + install -d -m0755 $(DESTDIR)$(bindir) + cp -u ${srcdir}/uci2wb $(DESTDIR)$(bindir) + install -d -m0755 $(DESTDIR)$(datadir)/man/man6 + cp -u ${srcdir}/uci2wb.6.gz $(DESTDIR)$(datadir)/man/man6 uci2wb.6.gz: uci2wb.pod pod2man -s 6 uci2wb.pod | gzip -9n > uci2wb.6.gz @@ -38,6 +42,6 @@ dist: rmdir UCI2WB uninstall: - rm -f $(DESTDIR)/usr/share/man/man6/uci2wb.6.gz - rm -f $(DESTDIR)/usr/games/uci2wb + rm -f $(DESTDIR)$(datadir)/man/man6/uci2wb.6.gz + rm -f $(DESTDIR)$(bindir)/uci2wb -- 1.7.0.4