Annotation of embedaddon/miniupnpd/miniupnpc-libevent/Makefile, revision 1.1.1.1

1.1       misho       1: # $Id: Makefile,v 1.7 2014/11/28 13:14:19 nanard Exp $
                      2: 
                      3: OS = $(shell $(CC) -dumpmachine)
                      4: PKG_CONFIG ?= pkg-config
                      5: 
                      6: CFLAGS = -O0 -g -DDEBUG
                      7: # libevent debug
                      8: CFLAGS += -DUSE_DEBUG
                      9: 
                     10: CFLAGS += -fPIC
                     11: CFLAGS += -ansi
                     12: CFLAGS += -Wall -W
                     13: CFLAGS += -D_BSD_SOURCE
                     14: ifeq (, $(findstring darwin, $(OS))$(findstring freebsd, $(OS)))
                     15: CFLAGS += -D_POSIX_C_SOURCE=200112L
                     16: endif
                     17: #CFLAGS += -I/usr/local/include
                     18: CFLAGS += $(shell $(PKG_CONFIG) --cflags libevent)
                     19: 
                     20: ifeq ($(shell if $(PKG_CONFIG) --atleast-version 2.2 libevent ; then echo "true" ; fi),true)
                     21: CFLAGS += -DENABLE_UPNP_EVENTS
                     22: endif
                     23: 
                     24: #LDLIBS   = -levent
                     25: LDLIBS   = $(shell $(PKG_CONFIG) --libs-only-l libevent)
                     26: #LDFLAGS += -L/usr/local/lib
                     27: LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libevent)
                     28: 
                     29: ifneq (, $(findstring darwin, $(OS)))
                     30: CFLAGS += -D_DARWIN_C_SOURCE
                     31: #CFLAGS += -I/opt/local/include
                     32: #LDFLAGS += -L/opt/local/lib
                     33: endif
                     34: 
                     35: LIB = libminiupnpc-ev.a
                     36: 
                     37: LIB_SRCS = miniupnpc-libevent.c minixml.c igd_desc_parse.c upnpreplyparse.c
                     38: 
                     39: SRCS = $(LIB_SRCS) upnpc-libevent.c
                     40: 
                     41: LIB_OBJS = $(patsubst %.c,%.o,$(LIB_SRCS))
                     42: 
                     43: OBJS = $(patsubst %.c,%.o,$(SRCS))
                     44: 
                     45: EXECUTABLE = upnpc-libevent
                     46: 
                     47: .PHONY:        all clean depend
                     48: 
                     49: all:   $(EXECUTABLE)
                     50: 
                     51: check:
                     52:        @echo "To be implemented"
                     53: 
                     54: clean:
                     55:        $(RM) $(OBJS)
                     56:        $(RM) $(EXECUTABLE)
                     57:        $(RM) $(LIB)
                     58: 
                     59: upnpc-libevent:        upnpc-libevent.o $(LIB)
                     60: 
                     61: $(LIB):        $(LIB_OBJS)
                     62:        $(AR) crs $@ $?
                     63: 
                     64: depend:
                     65:        makedepend -Y -- $(CFLAGS) -- $(SRCS) 2>/dev/null
                     66: 
                     67: # DO NOT DELETE THIS LINE -- make depend depends on it.
                     68: 
                     69: miniupnpc-libevent.o: miniupnpc-libevent.h declspec.h upnpreplyparse.h
                     70: miniupnpc-libevent.o: minixml.h igd_desc_parse.h
                     71: minixml.o: minixml.h
                     72: igd_desc_parse.o: igd_desc_parse.h
                     73: upnpreplyparse.o: upnpreplyparse.h minixml.h
                     74: upnpc-libevent.o: miniupnpc-libevent.h declspec.h upnpreplyparse.h

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>