summaryrefslogtreecommitdiff
path: root/lib/radius/Makefile
diff options
context:
space:
mode:
authorLuke Howard <lukeh@padl.com>2011-11-13 16:16:05 +1100
committerLuke Howard <lukeh@padl.com>2011-11-13 16:16:05 +1100
commit7ec93ff9e4d979e4bbcf33f9c90c94dc9d3cdba9 (patch)
treef10529f4e308bd082dcc348487d53bb50b3cbd87 /lib/radius/Makefile
parentceecc52da787a7a2e495d913cbaa7dbe1d7830fb (diff)
add new RADIUS client library
Diffstat (limited to 'lib/radius/Makefile')
-rw-r--r--lib/radius/Makefile68
1 files changed, 68 insertions, 0 deletions
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