summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-07-26 14:54:06 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2017-07-26 14:59:11 +0200
commitc532b58b892ae2c9696306e11fe44491740b736d (patch)
tree0241fa5ee86584ca30267bdd435aa94d0ccb7772 /Makefile
parent0cfd2d8ec76692ec4567d07eb89a256c267a1527 (diff)
downloadaports-cache-c532b58b892ae2c9696306e11fe44491740b736d.tar.bz2
aports-cache-c532b58b892ae2c9696306e11fe44491740b736d.tar.xz
make use of program_invocation_name optionalHEADmaster
fixes build on linux
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 6bbed9e..38372f5 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,17 @@ CC ?= gcc
LD ?= gcc
CFLAGS ?= -Werror -Wall -g -DDEBUG
-LDFLAGS ?=
+LDFLAGS ?=
+
+ifeq ($(shell uname),Darwin)
+HAVE_PROGRAM_INVOCATION_NAME=
+else
+HAVE_PROGRAM_INVOCATION_NAME=1
+endif
+
+ifeq ($(HAVE_PROGRAM_INVOCATION_NAME),1)
+CFLAGS += -DHAVE_PROGRAM_INVOCATION_NAME
+endif
aports-cache-objs := aports-cache.o