srcdir = @srcdir@ top_srcdir = @top_srcdir@ # Where does the installation go ? PREFIX=@prefix@ DESTDIR=@DESTDIR@ LIBSUBDIR=@LIBSUBDIR@ SBINDIR=$(DESTDIR)$(PREFIX)/sbin LIBDIR=$(DESTDIR)$(PREFIX)/$(LIBSUBDIR) # filename conventions EXE=@EXEEXT@ OBJ=@OBJEXT@ # compilers used. LIBDYNPFX=@LIBDYNPFX@ LIBDYN=@LIBDYN@ CC = @CC@ CXX = @CXX@ LD = @CXX@ RC = @RC@ STRIP = @STRIP@ all: Makefile build-dep Makefile: $(srcdir)/Makefile.in echo "Updating out-of date Makefiles..." ../reconfigure.sh build-dep: make dep=yes build # # Linux build only. # ifeq ($(RC),) # add -I.. in order to find config.h CFLAGS = \ @CFLAGS@ @DEFS@ -I$(srcdir) -I$(top_srcdir)/fancylog -I$(top_srcdir)/fancybase -I$(top_srcdir)/fancysock CXXFLAGS = \ @CXXFLAGS@ @DEFS@ -I$(srcdir) -I$(top_srcdir)/fancylog -I$(top_srcdir)/fancybase -I$(top_srcdir)/fancysock LDFLAGS = @LDFLAGS@ #libraries, which are in the same source tree. BASELIBRARIES=../fancylog/$(LIBDYNPFX)fancylog.$(LIBDYN) ../fancybase/$(LIBDYNPFX)fancybase.$(LIBDYN) ../fancysock/$(LIBDYNPFX)fancysock.$(LIBDYN) LIBS=$(BASELIBRARIES) @UTIL_LIBS@ @RESOLV_LIBS@ @LIBS@ %.depend: $(srcdir)/%.c $(CC) $(CFLAGS) -M $< -o $@ %.depend: $(srcdir)/%.cpp $(CXX) $(CXXFLAGS) -M $< -o $@ %.$(OBJ): $(srcdir)/%.c $(CC) $(CFLAGS) -c $< -o $@ %.$(OBJ): $(srcdir)/%.cpp $(CXX) $(CXXFLAGS) -c $< -o $@ PROGRAM=fancywrap build: $(PROGRAM) clean:: rm -f *.depend *.$(OBJ) *~ *.bak .*~ .*.bak core $(PROGRAM) # dummy target for xrefs foo: # # objects # FANCYCWRAP_OBJECTS = fancywrap.$(OBJ) \ wrappipe.$(OBJ) ../fancylog/$(LIBDYNPFX)fancylog.$(LIBDYN): foo cd ../fancylog; $(MAKE) ../fancybase/$(LIBDYNPFX)fancybase.$(LIBDYN): foo cd ../fancybase; $(MAKE) ../fancysock/$(LIBDYNPFX)fancysock.$(LIBDYN): foo cd ../fancysock; $(MAKE) ALLOBJECTS=$(FANCYCWRAP_OBJECTS) $(PROGRAM): $(FANCYCWRAP_OBJECTS) $(BASELIBRARIES) $(LD) $(FANCYCWRAP_OBJECTS) $(LDFLAGS) $(LIBS) -o $@ install: all if [ ! -d $(SBINDIR) ] ; then mkdir $(SBINDIR); fi cp $(PROGRAM) $(SBINDIR) $(STRIP) $(SBINDIR)/$(PROGRAM) chmod 755 $(SBINDIR)/$(PROGRAM) # # dependencies # ifeq ($(dep),yes) include $(addsuffix .depend, $(basename $(ALLOBJECTS))) endif else # dummy win32 build build: clean: install: endif distclean:: clean rm -f Makefile