freeswitch/libs/miniupnpc/Makefile.mingw
Michael Jerris f52df34b37 add pnp libs
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13510 d0543943-73ff-0310-b7d9-9358b9ac24b2
2009-05-29 20:14:45 +00:00

75 lines
1.9 KiB
Makefile

# $Id: Makefile.mingw,v 1.9 2008/07/02 23:31:15 nanard Exp $
# Miniupnp project.
# http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
# (c) 2005-2008 Thomas Bernard
CC = gcc
#CFLAGS = -Wall -g -DDEBUG
CFLAGS = -Wall -Os -DNDEBUG
LDLIBS = -lws2_32
# -lwsock32
PYTHON=\utils\python25\python
OBJS=miniwget.o minixml.o igd_desc_parse.o minisoap.o \
miniupnpc.o upnpreplyparse.o upnpcommands.o upnperrors.o
OBJSDLL=$(addprefix dll/, $(OBJS))
all: init upnpc-static upnpc-shared testminixml libminiupnpc.a miniupnpc.dll
init:
mkdir dll
echo "" > init
clean:
del upnpc testminixml *.o
del dll/*.o
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
echo $@ generated with $<
dll/upnpc.o: upnpc.o
echo $@ generated with $<
.c.o:
$(CC) $(CFLAGS) -DSTATICLIB -c -o $@ $<
$(CC) $(CFLAGS) -DMINIUPNP_EXPORTS -c -o dll/$@ $<
upnpc.o:
$(CC) $(CFLAGS) -DSTATICLIB -c -o $@ $<
$(CC) $(CFLAGS) -c -o dll/$@ $<
upnpc-static: upnpc.o libminiupnpc.a
$(CC) -o $@ $^ $(LDLIBS)
upnpc-shared: dll/upnpc.o miniupnpc.lib
$(CC) -o $@ $^ $(LDLIBS)
minixml.o: minixml.c minixml.h
upnpc.o: upnpc.c miniwget.h minisoap.h miniupnpc.h igd_desc_parse.h upnpreplyparse.h upnpcommands.h
miniwget.o: miniwget.c miniwget.h
minisoap.o: minisoap.c minisoap.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