freebsd-nq/usr.sbin/xntpd/parse/Makefile.kernel

77 lines
2.7 KiB
Makefile
Raw Normal View History

1993-12-21 18:36:48 +00:00
#
# very simple makefile (SunOS!)
#
# Possible defines:
# DEBUG_DCF: include debug code (STREAMS mechanism and parsing)
# DEBUG_CD: include signal propagation to sun4c LED (sun4c only)
#
# Possible defines (parsestreams variants only):
# KERNEL: must define
# VDDRV: loadable driver support - recommended
# KARCH: must define at make call for correct kernel module
# (currently only needed for parsestreams variants)
#
KARCH=
DEFS=-DSTREAM -DKERNEL -DVDDRV -D$(KARCH)
MICROTIME=../ppsclock/sys/$(KARCH)/microtime.s
all:
@if [ -f /kernel/unix ]; then \
$(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" KARCH="`(arch -k) 2>/dev/null || uname -a | awk '{ print $5 }'`" -f Makefile.kernel parse; \
else \
$(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" KARCH="`(arch -k) 2>/dev/null || uname -a | awk '{ print $5 }'`" -f Makefile.kernel parsestreams.o; \
fi
parse: parsesolaris.c libparse_kernel.a ../lib/libntp.a
@echo "--- WARNING: SunOS5 support is fresh and hardly tested"
@echo "--- This code could lead to kernel panics more"
@echo "--- easily than other streams modules"
$(CC) -c -I../include -D_KERNEL parsesolaris.c
ld -r -o parse parsesolaris.o libparse_kernel.a ../lib/libntp.a
@echo "--- Install 'parse' in /kernel/strmod for automatic loading"
1994-02-03 22:09:07 +00:00
mparsestreams.o: mparsestreams.o.$(KARCH)
@echo "--- You may load mparsestreams.o.$(KARCH) via 'modload mparsestreams.o.$(KARCH)' into the kernel"
mparsestreams.o.$(KARCH): parsestreams.c microtime.o ../lib/libntp.a libparse_kernel.a ../include/parse.h ../include/sys/parsestreams.h
1993-12-21 18:36:48 +00:00
cc -c -DMICROTIME $(DEFS) -I../include parsestreams.c
ld -r -o $@ parsestreams.o ../lib/libntp.a libparse_kernel.a \
microtime.o
rm -f parsestreams.o
1994-02-03 22:09:07 +00:00
parsestreams.o: parsestreams.o.$(KARCH)
@echo "--- You may load parsestreams.o.$(KARCH) via 'modload parsestreams.o.$(KARCH)' into the kernel"
parsestreams.o.$(KARCH): parsestreams.c ../lib/libntp.a libparse_kernel.a ../include/parse.h ../include/sys/parsestreams.h
1993-12-21 18:36:48 +00:00
cc -c $(DEFS) -I../include parsestreams.c
1994-02-03 22:09:07 +00:00
ld -r -o $@ parsestreams.o ../lib/libntp.a libparse_kernel.a
rm -f parsestreams.o
1993-12-21 18:36:48 +00:00
microtime.o: $(MICROTIME) assym.s
cc -E -I. $(MICROTIME) | sed -e '/\.global _uniqtime/d' > $@.i
as -o $@ $@.i
rm -f $@.i assym.s
assym.s: genassym
./genassym > $@
genassym: ../ppsclock/sys/genassym/genassym.c
cc -o $@ $?
libparse_kernel.a:
$(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" libparse_kernel.a
../lib/libntp.a:
cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)"
lint: parsestreams.c ../include/parse.h ../include/sys/parsestreams.h ../lib/llib-llibntp.ln
lint -u -I../include $(DEFS) parsestreams.c ../lib/llib-llibntp.ln
../lib/llib-llibntp.ln:
cd ../lib && make lintlib
clean:
rm -f *.o genassym assym.s parsestreams
distclean: clean