# # Makefile for tinysvcmdns # CPPFLAGS += -DPTHREAD_CREATE_DETACHED_SUPPORTED #CPPFLAGS += -DNDEBUG CPPFLAGS += $(CPPFLAGS_EXTRA) CFLAGS += -Wall -pedantic -std=gnu99 CFLAGS += -g CFLAGS += -O2 CFLAGS += $(CFLAGS_EXTRA) LDLIBS = -lpthread ifneq ($(CROSS_COMPILE),) CC = gcc CC := $(CROSS_COMPILE)$(CC) AR := $(CROSS_COMPILE)$(AR) endif BIN=testmdnsd mdnsd LIBTINYSVCMDNS_OBJS = mdns.o mdnsd.o .PHONY: all clean opkg release all: $(BIN) libtinysvcmdns.a clean: -$(RM) $(LIBTINYSVCMDNS_OBJS) -$(RM) $(BIN) -$(RM) libtinysvcmdns.a mdns.o: mdns.h mdnsd.o: mdns.h mdnsd.h testmdnsd.o: mdnsd.h testmdnsd: testmdnsd.o libtinysvcmdns.a libtinysvcmdns.a: $(patsubst %, libtinysvcmdns.a(%), $(LIBTINYSVCMDNS_OBJS)) mdnsd: testmdnsd strip -o $@ $< opkg: mdnsd $(wildcard opkg/CONTROL/*) etc/init.d/S80mdnsd install -D -p mdnsd opkg/sbin install -D -p etc/init.d/S80mdnsd opkg/etc/init.d/ opkg-pack opkg release: opkg tagname=$$(echo zeroconf*.opk | sed -n 'p;q') && \ tagname="$${tagname%_*.*}" && \ test -n "$${tagname}" && \ git tag -f -a -m "Release $${tagname}" "$${tagname}"