openpkg/openpkg.mk

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

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

mercurial