summaryrefslogtreecommitdiff
path: root/lib/radius/examples/Makefile
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2012-04-27 17:00:17 +0200
committerLinus Nordberg <linus@nordberg.se>2012-04-27 17:00:17 +0200
commit4b0ff99282a91bba93eec9db37831be73b8134e4 (patch)
tree087509c14291f207260d350c9fabf07c665a4f25 /lib/radius/examples/Makefile
parentc562df4b073a288862dd3c4ceaba7d6439f33b45 (diff)
parentefb18a601811888127be69499cf10891aa3a4c37 (diff)
Merge libradsec-new-client.
Diffstat (limited to 'lib/radius/examples/Makefile')
-rw-r--r--lib/radius/examples/Makefile54
1 files changed, 54 insertions, 0 deletions
diff --git a/lib/radius/examples/Makefile b/lib/radius/examples/Makefile
new file mode 100644
index 0000000..f39c343
--- /dev/null
+++ b/lib/radius/examples/Makefile
@@ -0,0 +1,54 @@
+#
+# GNU Makefile
+#
+.PHONY: all clean install
+
+SRCS = example_1.c example_2.c example_3.c example_4.c
+
+OBJS := ${SRCS:.c=.o}
+PROGRAMS := ${SRCS:.c=}
+
+all: ${PROGRAMS}
+
+HEADERS := ../client.h ../radius.h
+
+${OBJS}: ${HEADERS}
+
+$(info ${PROGRAMS} ${OBJS})
+
+${PROGRAMS}: ../libnetworkradius-client.a
+
+
+%.o : %.c
+ $(CC) $(CFLAGS) -I.. -I. -c $<
+
+%.o: ${HEADERS}
+
+LDFLAGS = -L.. -lnetworkradius-client -lcrypto -lssl
+CFLAGS = -I..
+
+../libnetworkradius-client.a:
+ @${MAKE} -C .. libnetworkradius-client.a
+
+radsample.o: radsample.c ${HEADERS} nr_vp_create.c nr_packet_send.c
+
+#radsample: radsample.o ../libnetworkradius-client.a
+# ${CC} ${LFDLAGS} ${LIBS} -o $@ $^
+
+sample_chap.o: sample_chap.c ${HEADERS}
+
+sample_chap: sample_chap.o ../libnetworkradius-client.a
+ ${CC} ${LFDLAGS} ${LIBS} -o $@ $^
+
+radsample2.o: radsample2.c ${HEADERS} nr_vp_create.c
+
+radsample2: radsample2.o ../libnetworkradius-client.a
+ ${CC} ${LFDLAGS} ${LIBS} -o $@ $^
+
+radsample3.o: radsample3.c ${HEADERS} nr_transmit.c nr_server_t.c nr_vp_create.c
+
+radsample3: radsample3.o ../libnetworkradius-client.a
+ ${CC} ${LFDLAGS} ${LIBS} -o $@ $^
+
+clean:
+ @rm -rf *.o *.a *~