openbsd-ports/net/iodine/patches/patch-src_Makefile
sthen 6d962390a0 - update to 0.5.1, from Simon Kuhnle.
- don't hide command lines in build output
- honour CC in the environment not just mk.conf
2009-03-30 09:17:45 +00:00

42 lines
1.2 KiB
Plaintext

$OpenBSD: patch-src_Makefile,v 1.2 2009/03/30 09:17:45 sthen Exp $
--- src/Makefile.orig Sat Mar 21 13:07:49 2009
+++ src/Makefile Mon Mar 30 10:09:57 2009
@@ -1,4 +1,4 @@
-CC = gcc
+CC ?= gcc
COMMONOBJS = tun.o dns.o read.o encoding.o login.o base32.o base64.o md5.o common.o
CLIENTOBJS = iodine.o
CLIENT = ../bin/iodine
@@ -10,7 +10,8 @@ ARCH = `uname -m`
LIBPATH = -L.
LDFLAGS = -lz `sh osflags $(TARGETOS) link` $(LIBPATH)
-CFLAGS = -c -g -Wall -D$(OS) -pedantic `sh osflags $(TARGETOS) cflags`
+CFLAGS ?= -g
+CFLAGS += -c -Wall -D$(OS) -pedantic `sh osflags $(TARGETOS) cflags`
all: stateos $(CLIENT) $(SERVER)
@@ -18,18 +19,15 @@ stateos:
@echo OS is $(OS), arch is $(ARCH)
$(CLIENT): $(COMMONOBJS) $(CLIENTOBJS)
- @echo LD $@
@mkdir -p ../bin
- @$(CC) $(COMMONOBJS) $(CLIENTOBJS) -o $(CLIENT) $(LDFLAGS)
+ $(CC) $(COMMONOBJS) $(CLIENTOBJS) -o $(CLIENT) $(LDFLAGS)
$(SERVER): $(COMMONOBJS) $(SERVEROBJS)
- @echo LD $@
@mkdir -p ../bin
- @$(CC) $(COMMONOBJS) $(SERVEROBJS) -o $(SERVER) $(LDFLAGS)
+ $(CC) $(COMMONOBJS) $(SERVEROBJS) -o $(SERVER) $(LDFLAGS)
.c.o:
- @echo CC $<
- @$(CC) $(CFLAGS) $< -o $@
+ $(CC) $(CFLAGS) $< -o $@
clean:
@echo "Cleaning src/"