From 7ec93ff9e4d979e4bbcf33f9c90c94dc9d3cdba9 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Sun, 13 Nov 2011 16:16:05 +1100 Subject: add new RADIUS client library --- lib/radius/Makefile | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 lib/radius/Makefile (limited to 'lib/radius/Makefile') diff --git a/lib/radius/Makefile b/lib/radius/Makefile new file mode 100644 index 0000000..63eff89 --- /dev/null +++ b/lib/radius/Makefile @@ -0,0 +1,68 @@ +# +# GNU Makefile +# +.PHONY: all clean install +all: libnetworkradius-client.a + +SRCS := dict.c attrs.c packet.c valuepair.c static.c id.c \ + crypto.c custom.c print.c parse.c + +OBJS := ${SRCS:.c=.o} + +HEADERS := client.h radius.h + +CFLAGS := -I. -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W -Wredundant-decls -Wundef + +VERSION := 1.0 +NAME := networkradius-client-$(VERSION) + + +# +# The DICTIONARIES variable can be used to point to the FreeRADIUS +# dictionaries. +# +ifeq "${DICTIONARIES}" "" +DICTIONARIES := $(filter-out %~,$(wildcard share/dictionary*)) +endif + +${OBJS}: ${HEADERS} + +radius.h dictionaries.c: ${DICTIONARIES} convert.pl common.pl + ./convert.pl ${DICTIONARIES} + +static.o: static.c dictionaries.c + +%.o : %.c + $(CC) $(CFLAGS) -c $< + +%.o: ${HEADERS} + +.PHONY: networkradius-devel +networkradius-devel: + @[ -e $@ ] || ln -s . $@ + +libnetworkradius-client.a: ${OBJS} + ${AR} ${ARFLAGS} $@ $^ + +LIBS := -lcrypto -lssl +LDFLAGS = -L. -lnetworkradius-client + +.PHONY: html +html: + doxygen doxygen.conf + +clean: + @rm -rf *.o *.a *~ html + +install: libnetworkradius-client.a + +.PHONY: publish +publish: + @scp -r html/* networkradius.com@liberty:www.new/site/clientapi/ + +$(NAME).tar.gz: $(wildcard Makefile *.pl *.txt *.[ch] \ + examples/*.[ch] doc/*.txt share/dictionary*) + git archive --format=tar --prefix=$(NAME)/ bsd | gzip > $@ + +.PHONY: tar +tar: $(NAME).tar.gz -- cgit v1.1