freebsd-dev/contrib/ntp/ntpdc/Makefile.am

67 lines
2.2 KiB
Makefile
Raw Normal View History

AUTOMAKE_OPTIONS= ../util/ansi2knr
bindir= ${exec_prefix}/${BINSUBDIR}
2004-07-20 15:01:56 +00:00
bin_PROGRAMS= ntpdc
EXTRA_PROGRAMS= ntpdc-layout
EXTRA_DATA= check-layout
BUILT_SOURCES= @MAKE_CHECK_LAYOUT@
AM_CPPFLAGS= -I$(top_srcdir)/include $(LIBOPTS_CFLAGS)
1999-12-09 13:01:21 +00:00
# LDADD might need RESLIB and ADJLIB
ntpdc_LDADD= version.o @READLINE_LIBS@ $(LIBOPTS_LDADD) ../libntp/libntp.a
2004-07-20 15:01:56 +00:00
# ntpdc-layout doesn't need any additional libraries at all
ntpdc_layout_LDADD=
DISTCLEANFILES= .version version.c
CLEANFILES= check-layout layout.here nl.c ntpdc-layout
noinst_HEADERS= ntpdc.h
ETAGS_ARGS= Makefile.am
EXTRA_DIST= nl_in.c nl.pl layout.std \
ntpdc-opts.def ntpdc.1 ntpdc-opts.texi ntpdc-opts.menu
BUILT_SOURCES+= ntpdc-opts.c ntpdc-opts.h ntpdc.1 ntpdc-opts.texi \
ntpdc-opts.menu
man_MANS= ntpdc.1
run_ag= cd $(srcdir) && autogen -L ../include --writable
std_def_list= $(top_srcdir)/include/debug-opt.def \
$(top_srcdir)/include/autogen-version.def \
$(top_srcdir)/include/copyright.def \
$(top_srcdir)/include/homerc.def \
$(top_srcdir)/include/version.def
$(srcdir)/ntpdc-opts.h: $(srcdir)/ntpdc-opts.c
$(srcdir)/ntpdc-opts.c: $(srcdir)/ntpdc-opts.def $(std_def_list)
$(run_ag) ntpdc-opts.def
$(srcdir)/ntpdc.1: $(srcdir)/ntpdc-opts.def $(std_def_list)
$(run_ag) -Tagman1.tpl -bntpdc ntpdc-opts.def
1999-12-09 13:01:21 +00:00
$(srcdir)/ntpdc-opts.texi $(srcdir)/ntpdc-opts.menu: $(srcdir)/ntpdc-opts.def $(std_def_list)
$(run_ag) -Taginfo.tpl -DLEVEL=section ntpdc-opts.def
1999-12-09 13:01:21 +00:00
ntpdc_SOURCES = ntpdc.c ntpdc_ops.c ntpdc-opts.c ntpdc-opts.h
2004-07-20 15:01:56 +00:00
ntpdc-layout.o: nl.c
layout.here: ntpdc-layout
./ntpdc-layout > $@
check-layout: ntpdc-layout layout.std layout.here
cmp $(srcdir)/layout.std layout.here && echo stamp > $@
1999-12-09 13:01:21 +00:00
$(PROGRAMS): $(LDADD)
../libntp/libntp.a:
cd ../libntp && $(MAKE)
$(top_srcdir)/version :
cd $(top_srcdir) && $(MAKE) version
2004-07-20 15:01:56 +00:00
version.o: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
2002-10-29 19:58:12 +00:00
env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpdc
1999-12-09 13:01:21 +00:00
$(COMPILE) -c version.c
2004-07-20 15:01:56 +00:00
# I ran nl_in.c (attached, to be installed into ntpdc) through
# $(CC) -E nl_in.c | nl.pl > nl.c
nl.c: nl_in.c nl.pl Makefile.am
$(CC) -E $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > nl.c
include ../bincheck.mf