zeroconf/Makefile

54 lines
947 B
Makefile
Raw Normal View History

2011-04-10 13:51:52 +00:00
#
# Makefile for tinysvcmdns
#
2020-07-24 09:16:53 +00:00
CPPFLAGS += -DPTHREAD_CREATE_DETACHED_SUPPORTED
#CPPFLAGS += -DNDEBUG
CPPFLAGS += $(CPPFLAGS_EXTRA)
2011-04-10 13:51:52 +00:00
CFLAGS += -Wall -pedantic -std=gnu99
CFLAGS += -g
CFLAGS += -O2
2020-07-24 09:16:53 +00:00
CFLAGS += $(CFLAGS_EXTRA)
2011-04-10 13:51:52 +00:00
LDLIBS = -lpthread
ifneq ($(CROSS_COMPILE),)
CC = gcc
CC := $(CROSS_COMPILE)$(CC)
AR := $(CROSS_COMPILE)$(AR)
endif
2011-04-10 13:51:52 +00:00
BIN=testmdnsd
LIBTINYSVCMDNS_OBJS = mdns.o mdnsd.o
.PHONY: all clean opkg
2011-04-10 13:51:52 +00:00
all: $(BIN) libtinysvcmdns.a
clean:
-$(RM) *.o
-$(RM) *.bin
-$(RM) mdns
-$(RM) $(BIN)
-$(RM) libtinysvcmdns.a
mdns.o: mdns.h
2011-04-10 13:51:52 +00:00
mdnsd.o: mdns.h mdnsd.h
testmdnsd.o: mdnsd.h
2011-04-10 13:51:52 +00:00
testmdnsd: testmdnsd.o libtinysvcmdns.a
libtinysvcmdns.a: $(patsubst %, libtinysvcmdns.a(%), $(LIBTINYSVCMDNS_OBJS))
mdnsd: testmdnsd
strip -o $@ $<
install -C -D -p mdnsd sbin/
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