# # Makefile # PROG= led SUBDIRS= src prefix= @prefix@ exec_prefix= @exec_prefix@ bindir= @bindir@ datadir= @datadir@ mandir= @mandir@ libdir= @libdir@ .PHONY: all clean distclean install install-bin install-mod .PHONY: install-data @SET_MAKE@ # # subdir recursion macro # RECUR= @for dir in $(SUBDIRS) ; do \ echo "===> $$dir"; \ (cd $$dir && $(MAKE) $@) \ done all: $(RECUR) clean: $(RECUR) distclean: clean -rm -f config.cache config.status config.log src/config.h -rm -f Makefile src/Makefile src/modules/Makefile -rm -f src/modules/Makefile.module src/modules/vhighlight/Makefile install-bin: @INSTALL@ -d $(bindir) @INSTALL@ src/$(PROG) $(bindir) install-mod: cd src ; \ dynmods=`perl listmods.pl dynamic` ; \ if [ x"$$dynmods" != x"" ] ; then \ @INSTALL@ -d $(libdir)/$(PROG)/modules ; \ for file in $$dynmods ; do \ @INSTALL@ modules/build/$${file}.so \ $(libdir)/$(PROG)/modules ; \ done ; \ fi install-data: @INSTALL@ -d $(datadir)/$(PROG) cd share ; \ for i in `find . -type d | grep -v CVS` ; do \ @INSTALL@ -d $(datadir)/$(PROG)/$$i ; \ done ; \ for i in `find . -type f | grep -v CVS` ; do \ @INSTALL@ -m 444 $$i $(datadir)/$(PROG)/$$i ; \ done ( cd $(datadir)/$(PROG)/syntax ; \ ln -f -s c h ) install: all install-bin install-mod install-data deinstall: -rm -f $(bindir)/$(PROG) -rm -rf $(libdir)/$(PROG) -rm -rf $(datadir)/$(PROG)