blob: 18bc90a995870f49bcab14e3a0a65f7c308aad8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
Makefile | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 270d7e1..578884e 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) > $@
|