File: Makefile

package info (click to toggle)
libradsec 0.0.5-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 2,576 kB
  • ctags: 1,457
  • sloc: sh: 11,411; ansic: 10,493; perl: 270; makefile: 172
file content (54 lines) | stat: -rw-r--r-- 1,138 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 *~