From 603249f732f034a5c35e8a7c1b4fed3e4ae43317 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Sun, 1 Dec 2013 09:44:31 +0000 Subject: [PATCH] Fix compile on Gentoo distro Patch from Justin Lecher "vpnc-0.5.3_p514-as-needed.patch" Already applyed in Gentoo at build time. Signed-off-by: Antonio Borneo git-svn-id: https://svn.unix-ag.uni-kl.de/vpnc/trunk@531 315857ad-0bdb-0310-b42e-dec37551a5f0 --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index e0f8148..1d54f46 100644 --- a/Makefile +++ b/Makefile @@ -60,16 +60,16 @@ BINSRCS = $(addsuffix .c,$(BINS)) VERSION := $(shell sh mk-version) RELEASE_VERSION := $(shell cat VERSION) -CC=gcc +CC ?= gcc CFLAGS ?= -O3 -g CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings CFLAGS += $(shell libgcrypt-config --cflags) $(CRYPTO_CFLAGS) CPPFLAGS += -DVERSION=\"$(VERSION)\" LDFLAGS ?= -g -LDFLAGS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD) +LIBS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD) ifeq ($(shell uname -s), SunOS) -LDFLAGS += -lnsl -lresolv -lsocket +LIBS += -lnsl -lresolv -lsocket endif ifneq (,$(findstring Apple,$(shell $(CC) --version))) # enabled in FSF GCC, disabled by default in Apple GCC @@ -79,16 +79,16 @@ endif all : $(BINS) vpnc.8 vpnc : $(OBJS) vpnc.o - $(CC) -o $@ $^ $(LDFLAGS) + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) vpnc.8 : vpnc.8.template makeman.pl vpnc ./makeman.pl cisco-decrypt : cisco-decrypt.o decrypt-utils.o - $(CC) -o $@ $^ $(LDFLAGS) + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) test-crypto : sysdep.o test-crypto.o crypto.o $(CRYPTO_OBJS) - $(CC) -o $@ $^ $(LDFLAGS) + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) .depend: $(SRCS) $(BINSRCS) $(CC) -MM $(SRCS) $(BINSRCS) $(CFLAGS) $(CPPFLAGS) > $@ -- 2.11.4.GIT