udyfi

Small client for dy.fi (and possibly other services) DNS renewals
git clone https://git.inz.fi/udyfi/
Log | Files | Refs

Makefile (943B)


      1 CFLAGS ?= -Os
      2 CFLAGS += -W -Wall -std=c99 -pedantic -D_POSIX_C_SOURCE=200809L
      3 PREFIX ?= /usr/local
      4 BINDIR := $(PREFIX)/bin
      5 MANDIR := $(PREFIX)/share/man/man8
      6 IFADDRS_CFLAGS ?= -DUSE_IFADDRS
      7 HEADERS = arg.h config.h
      8 VERSION=0.1.0
      9 
     10 LIBTLS_CFLAGS += -DUSE_LIBTLS -I/usr/local/include
     11 LIBS := -L/usr/local/lib -ltls
     12 
     13 #OPENSSL_CFLAGS += $(shell pkg-config openssl --cflags && echo -DUSE_OPENSSL)
     14 #LIBS := $(shell pkg-config openssl --libs)
     15 #HEADERS += minitls.h
     16 
     17 all: udyfi
     18 
     19 config.h: config.def.h
     20 	if test -f "$@"; then echo "Refusing to overwrite old config.h; please remove or update manually"; false; fi
     21 	cp config.def.h $@
     22 
     23 udyfi: udyfi.c $(HEADERS)
     24 	$(CROSS)$(CC) -DVERSION='"$(VERSION)"' $(CFLAGS) $(LIBTLS_CFLAGS) $(OPENSSL_CFLAGS) $(IFADDRS_CFLAGS) $< -o $@ $(LIBS)
     25 
     26 clean:
     27 	rm -f udyfi
     28 
     29 install: udyfi
     30 	install -d $(DESTDIR)$(BINDIR)
     31 	install udyfi $(DESTDIR)$(BINDIR)
     32 	install -d $(DESTDIR)$(MANDIR)
     33 	install udyfi.8 $(DESTDIR)$(MANDIR)