wownero/external/miniupnpc/Makefile.mingw

103 lines
2.7 KiB
Makefile
Raw Normal View History

2015-12-30 07:56:25 +00:00
# $Id: Makefile.mingw,v 1.21 2015/09/18 12:45:16 nanard Exp $
2014-04-09 12:14:35 +00:00
# Miniupnp project.
# http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
2015-12-30 07:56:25 +00:00
# (c) 2005-2015 Thomas Bernard
2014-04-09 12:14:35 +00:00
# This Makefile is made for MinGW
#
2015-12-30 07:56:25 +00:00
CC ?= gcc
2014-04-09 12:14:35 +00:00
#CFLAGS = -Wall -g -DDEBUG -D_WIN32_WINNT=0X501
CFLAGS = -Wall -Os -DNDEBUG -D_WIN32_WINNT=0X501
LDLIBS = -lws2_32 -liphlpapi
# -lwsock32
# -liphlpapi is needed for GetBestRoute() and GetIpAddrTable()
PYTHON=\utils\python25\python
OBJS=miniwget.o minixml.o igd_desc_parse.o minisoap.o \
2015-12-30 07:56:25 +00:00
minissdpc.o \
2014-04-09 12:14:35 +00:00
miniupnpc.o upnpreplyparse.o upnpcommands.o upnperrors.o \
2015-12-30 07:56:25 +00:00
connecthostport.o portlistingparse.o receivedata.o \
upnpdev.o
2014-04-09 12:14:35 +00:00
OBJSDLL=$(addprefix dll/, $(OBJS))
2016-03-21 11:37:54 +00:00
all: init upnpc-static upnpc-shared testminixml libminiupnpc.a \
miniupnpc.dll listdevices
2014-04-09 12:14:35 +00:00
init:
mkdir dll
echo init > init
clean:
del upnpc testminixml *.o
del dll\*.o
del *.exe
del miniupnpc.dll
del libminiupnpc.a
libminiupnpc.a: $(OBJS)
$(AR) cr $@ $?
pythonmodule: libminiupnpc.a
$(PYTHON) setupmingw32.py build --compiler=mingw32
$(PYTHON) setupmingw32.py install --skip-build
miniupnpc.dll: libminiupnpc.a $(OBJSDLL)
dllwrap -k --driver-name gcc \
--def miniupnpc.def \
--output-def miniupnpc.dll.def \
--implib miniupnpc.lib -o $@ \
$(OBJSDLL) $(LDLIBS)
miniupnpc.lib: miniupnpc.dll
2015-12-30 07:56:25 +00:00
# echo $@ generated with $<
2014-04-09 12:14:35 +00:00
dll/upnpc.o: upnpc.o
2015-12-30 07:56:25 +00:00
# echo $@ generated with $<
2014-04-09 12:14:35 +00:00
.c.o:
$(CC) $(CFLAGS) -DMINIUPNP_STATICLIB -c -o $@ $<
2014-04-09 12:14:35 +00:00
$(CC) $(CFLAGS) -DMINIUPNP_EXPORTS -c -o dll/$@ $<
2015-12-30 07:56:25 +00:00
upnpc.o: upnpc.c
$(CC) $(CFLAGS) -DMINIUPNP_STATICLIB -c -o $@ $<
2014-04-09 12:14:35 +00:00
$(CC) $(CFLAGS) -c -o dll/$@ $<
# --enable-stdcall-fixup
upnpc-static: upnpc.o libminiupnpc.a
$(CC) -o $@ $^ $(LDLIBS)
upnpc-shared: dll/upnpc.o miniupnpc.lib
$(CC) -o $@ $^ $(LDLIBS)
2016-03-21 11:37:54 +00:00
listdevices: listdevices.o libminiupnpc.a
$(CC) -o $@ $^ $(LDLIBS)
2014-04-09 12:14:35 +00:00
wingenminiupnpcstrings: wingenminiupnpcstrings.o
wingenminiupnpcstrings.o: wingenminiupnpcstrings.c
miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings
wingenminiupnpcstrings $< $@
2015-12-30 07:56:25 +00:00
minixml.o: minixml.c minixml.h
2014-04-09 12:14:35 +00:00
2015-12-30 07:56:25 +00:00
upnpc.o: miniwget.h minisoap.h miniupnpc.h igd_desc_parse.h
upnpc.o: upnpreplyparse.h upnpcommands.h upnperrors.h miniupnpcstrings.h
2014-04-09 12:14:35 +00:00
miniwget.o: miniwget.c miniwget.h miniupnpcstrings.h connecthostport.h
minisoap.o: minisoap.c minisoap.h miniupnpcstrings.h
miniupnpc.o: miniupnpc.c miniupnpc.h minisoap.h miniwget.h minixml.h
igd_desc_parse.o: igd_desc_parse.c igd_desc_parse.h
testminixml: minixml.o igd_desc_parse.o testminixml.c
upnpreplyparse.o: upnpreplyparse.c upnpreplyparse.h minixml.h
upnpcommands.o: upnpcommands.c upnpcommands.h upnpreplyparse.h miniupnpc.h portlistingparse.h
2015-12-30 07:56:25 +00:00
minissdpc.o: minissdpc.c minissdpc.h receivedata.h
upnpdev.o: upnpdev.c upnpdev.h