openpkg/openpkg.mk

Wed, 08 Feb 2012 20:07:00 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 08 Feb 2012 20:07:00 +0200
changeset 588
300d43423c2e
permissions
-rw-r--r--

Update version, adapt patch, correct PID writing, correct build on newer
FreeBSD releases, and most importantly introduce new patch to try to
avoid segfault caused by multiple network interfaces with the same (or
no) address. This is common when configuring bridges and tunnels.

michael@428 1
michael@428 2 CC = cc
michael@428 3 CFLAGS =
michael@428 4 LDFLAGS =
michael@428 5 LIBS =
michael@428 6
michael@428 7 OPENPKG_PREFIX = /openpkg
michael@428 8 OPENPKG_SUSR = root
michael@428 9 OPENPKG_MUSR = openpkg
michael@428 10
michael@428 11 OPENPKG_DOT_C = openpkg.c
michael@428 12
michael@428 13 openpkg: $(OPENPKG_DOT_C)
michael@428 14 @os_name=`(uname -s) 2>/dev/null` || os_name='Unknown'; \
michael@428 15 os_name=`echo "$${os_name}" |\
michael@428 16 sed -e 's;[^a-zA-Z0-9];;g' |\
michael@428 17 tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`; \
michael@428 18 echo "++ compiling \"openpkg\" executable"; \
michael@428 19 echo " OPENPKG_PLATFORM_$${os_name}"; \
michael@428 20 echo " OPENPKG_PREFIX=\"$(OPENPKG_PREFIX)\""; \
michael@428 21 echo " OPENPKG_SUSR=\"$(OPENPKG_SUSR)\""; \
michael@428 22 echo " OPENPKG_MUSR=\"$(OPENPKG_MUSR)\""; \
michael@428 23 $(CC) $(CFLAGS) \
michael@428 24 -DOPENPKG_PLATFORM_$${os_name} \
michael@428 25 -DOPENPKG_PREFIX=\"$(OPENPKG_PREFIX)\" \
michael@428 26 -DOPENPKG_SUSR=\"$(OPENPKG_SUSR)\" \
michael@428 27 -DOPENPKG_MUSR=\"$(OPENPKG_MUSR)\" \
michael@428 28 -o openpkg $(OPENPKG_DOT_C) \
michael@428 29 $(LDFLAGS) $(LIBS)
michael@428 30
michael@428 31 clean:
michael@428 32 -rm -f openpkg
michael@428 33

mercurial