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
|
srcdir = .
vpath %.c $(srcdir)
vpath %.h $(srcdir)
PROGS = posix gentest tpwdb radtest grouptest
SRCS = $(srcdir)/posix.c $(srcdir)/gentest.c $(srcdir)/tpwdb.c \
$(srcdir)/radtest.c $(srcdir)/grouptest.c
OBJS = posix.o gentest.o tpwdb.o radtest.o grouptest.o
CFLAGS+=-I. -I$(srcdir)/ -I$(srcdir)/../include
# rules
junk:
@echo "this is not a top-level Makefile"
exit 1
%.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
all: ${PROGS}
posix: posix.o ../libpwdb/libpwdb.a
$(CC) -o $@ $< ../libpwdb/libpwdb.a $(NSLLIB)
tpwdb: tpwdb.o ../libpwdb/libpwdb.a
${CC} -g -o $@ $< ../libpwdb/libpwdb.a $(NSLLIB) # $(LOADLIBES)
radtest: radtest.o ../libpwdb/libpwdb.a
${CC} -g -o $@ $< ../libpwdb/libpwdb.a $(NSLLIB) # $(LOADLIBES)
gentest: gentest.o ../libpwdb/libpwdb.a
${CC} -g -o $@ $< ../libpwdb/libpwdb.a $(NSLLIB) # $(LOADLIBES)
grouptest: grouptest.o ../libpwdb/libpwdb.a
${CC} -g -o $@ $< ../libpwdb/libpwdb.a $(NSLLIB) # $(LOADLIBES)
install:
true
clean:
rm -f ${PROGS} *.o *~
|