1## Process this file with automake to produce Makefile.in 2 3# Package: am-utils 4# Level: Makefile for amd/ directory 5# Author: Erez Zadok 6 7# no need for libaminfo to be yet another dynamic library 8noinst_LIBRARIES = libaminfo.a 9sbin_PROGRAMS = amd sun2amd 10 11# man pages 12man_MANS = amd.8 sun2amd.8 13 14YLWRAP= $(top_srcdir)/ylwrap.amd 15 16# test scripts 17TESTS = test1.sh 18 19# headers this depends on, not to be installed 20noinst_HEADERS = amd.h sun_map.h 21 22# sources which get auto-built (from yacc/lex) 23BUILT_SOURCES = \ 24 conf_parse.c conf_parse.h conf_tok.c \ 25 sun_map_parse.c sun_map_parse.h sun_map_tok.c 26AM_YFLAGS = -d 27 28############################################################################## 29# *.y must be listed before *.l, because of a bug in automake-1.2 30# which will not generate the .h needs for the lex file from the yacc file. 31# I took out the conf .y/.l files b/c of bad interaction between bsd44 make 32# and automake-1.2 rules. 33libaminfo_a_SOURCES = \ 34 sun_map_parse.y \ 35 sun_map_tok.l \ 36 sun_map.c 37 38# the complete list of all optional sources for libaminfo 39EXTRA_libaminfo_a_SOURCES = \ 40 info_file.c \ 41 info_exec.c \ 42 info_hesiod.c \ 43 info_ldap.c \ 44 info_ndbm.c \ 45 info_nis.c \ 46 info_nisplus.c \ 47 info_passwd.c \ 48 info_sun.c \ 49 info_union.c 50 51# AMD_INFO_OBJS: a list of info_*.o objects added, depending on which map 52# types this system supports. 53EXTRA_libaminfo_a_OBJECTS = @AMD_INFO_OBJS@ 54libaminfo_a_LIBADD = @AMD_INFO_OBJS@ 55libaminfo_a_DEPENDENCIES = @AMD_INFO_OBJS@ 56 57############################################################################## 58# sources needed: note .y and .l files have to be first 59# get_args.c is handled separately 60amd_SOURCES = \ 61 conf_parse.y \ 62 conf_tok.l \ 63 \ 64 am_ops.c \ 65 amd.c \ 66 amfs_auto.c \ 67 amfs_direct.c \ 68 amfs_error.c \ 69 amfs_generic.c \ 70 amfs_host.c \ 71 amfs_link.c \ 72 amfs_linkx.c \ 73 amfs_nfsl.c \ 74 amfs_nfsx.c \ 75 amfs_program.c \ 76 amfs_root.c \ 77 amfs_toplvl.c \ 78 amfs_union.c \ 79 amq_subr.c \ 80 amq_svc.c \ 81 autil.c \ 82 clock.c \ 83 conf.c \ 84 map.c \ 85 mapc.c \ 86 mntfs.c \ 87 nfs_prot_svc.c \ 88 nfs_start.c \ 89 nfs_subr.c \ 90 opts.c \ 91 readdir.c \ 92 restart.c \ 93 rpc_fwd.c \ 94 sched.c \ 95 srvr_amfs_auto.c \ 96 srvr_nfs.c 97 98# the complete list of all optional sources for amd 99EXTRA_amd_SOURCES = \ 100 ops_cachefs.c \ 101 ops_cdfs.c \ 102 ops_efs.c \ 103 ops_ext.c \ 104 ops_lofs.c \ 105 ops_lustre.c \ 106 ops_mfs.c \ 107 ops_nfs.c \ 108 ops_nfs3.c \ 109 ops_nfs4.c \ 110 ops_nullfs.c \ 111 ops_pcfs.c \ 112 ops_tfs.c \ 113 ops_tmpfs.c \ 114 ops_udf.c \ 115 ops_ufs.c \ 116 ops_umapfs.c \ 117 ops_unionfs.c \ 118 ops_xfs.c \ 119 \ 120 get_args.c 121 122# AMD_FS_OBJS: a list of ops_*.o objects added, depending on which 123# filesystem types this system supports. 124EXTRA_amd_OBJECTS = @AMD_FS_OBJS@ 125amd_LDADD = $(EXTRA_amd_OBJECTS) get_args.o libaminfo.a ../libamu/libamu.la 126 127############################################################################## 128sun2amd_SOURCES = \ 129 sun2amd.c 130 131sun2amd_LDADD = libaminfo.a ../libamu/libamu.la 132 133############################################################################## 134# must manually add f/lex library to LIBS, and not to LDADD. 135##LIBS = @LIBS@ @LEXLIB@ @WRAPLIB@ 136# f/lex libraries are incomatible with multiple scanners: don't include 137LIBS = @LIBS@ @WRAPLIB@ 138 139# additional files to distribute and clean 140EXTRA_DIST = ops_TEMPLATE.c $(man_MANS) $(TESTS) 141CLEANFILES = $(BUILT_SOURCES) 142DISTCLEANFILES = build_version.h ops_autofs.c 143 144# do not distribute files that should be generated by lex/yacc locally 145dist-hook: 146 (cd $(distdir) && rm -f $(BUILT_SOURCES)) 147 148AM_CPPFLAGS = -I$(top_srcdir)/include 149 150# allow users to add their own flags via "configure --enable-am-flags=ARG" 151AMU_CFLAGS = @AMU_CFLAGS@ 152AM_CFLAGS = $(AMU_CFLAGS) 153 154# dependencies 155$(PROGRAMS): $(LDADD) 156get_args.o: build_version.h 157$(amd_OBJECTS) $(EXTRA_amd_OBJECTS) $(sun2amd_OBJECTS) $(libaminfo_a_OBJECTS) $(EXTRA_libaminfo_a_OBJECTS): \ 158 ../config.h \ 159 ../aux_conf.h \ 160 $(top_srcdir)/include/am_compat.h \ 161 $(top_srcdir)/include/am_defs.h \ 162 $(top_srcdir)/include/am_utils.h \ 163 $(top_srcdir)/include/am_xdr_func.h \ 164 $(top_srcdir)/include/amq_defs.h \ 165 @AMU_NFS_PROT_HEADER@ \ 166 @AMU_AUTOFS_PROT_HEADER@ \ 167 $(noinst_HEADERS) 168 169# auto-generate build number 170build_version.h: $(amd_OBJECTS) $(EXTRA_amd_OBJECTS) $(libaminfo_a_OBJECTS) $(EXTRA_libaminfo_a_OBJECTS) get_args.c 171 $(top_srcdir)/m4/update_build_version 172