Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
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 |