- SOURCES = @SOURCES@
- DESTS = $(SOURCES:.c=.o)
- MISSING = @MISSING@
- MISSDESTS= $(MISSING:.c=.o)
- DESTDIR =
- CC = @CC@
- LIBS = @LIBS@
- MISSLIBS = @MISSLIBS@
- DEFS = @DEFS@ -D@OS@ @OS_OPT@
- INSTALL = @INSTALL@
- prefix = @prefix@
- exec_prefix = @exec_prefix@
- BINDIR = @bindir@
- MANDIR = @mandir@
- SHAREDIR = ${prefix}/share/@PROG@
- DOCDIR = ${prefix}/doc/@PROG@-@VERSION@
- DOC = COPYING README README.PLUGINS CHANGELOG HISTORY AUTHORS TODO THANKS KNOWN-BUGS PORTINGS
- DEBUG = @DEBUG@
- CFLAG = @CFLAGS@
- COPTS = -I.
- PROG = @PROG@
- VERSION = @VERSION@
- ALLOPT = $(DEBUG) $(CFLAG) $(COPTS)
- .c.o:
- $(CC) $(ALLOPT) $(DEFS) -c -o $@ $<
- all: @PROG@
- @PROG@: $(DESTS) missing
- $(CC) $(ALLOPT) $(DEFS) $(LIBS) $(MISSLIBS) -o $@ $(DESTS)
- @echo
- @echo @PROG@ is ready...
- @echo
- missing: $(MISSDESTS)
- install: @PROG@ strip
- $(INSTALL) -d $(DESTDIR)$(BINDIR)
- $(INSTALL) -m 700 $(PROG) $(DESTDIR)$(BINDIR)
- $(INSTALL) -d $(DESTDIR)$(SHAREDIR)
- $(INSTALL) -m 644 ./share/* $(DESTDIR)$(SHAREDIR)
- $(INSTALL) -d $(DESTDIR)$(DOCDIR)
- $(INSTALL) -m 644 $(DOC) $(DESTDIR)$(DOCDIR)
- $(INSTALL) -d $(DESTDIR)$(MANDIR)/man8
- $(INSTALL) -m 644 $(PROG).8 $(DESTDIR)$(MANDIR)/man8/$(PROG).8
- plug-ins:
- cd plugins && make && cd ..
- cp -f ./plugins/*/ec_*.so ./
- plug-ins_install:
- cd plugins && make install DESTDIR=$(DESTDIR) && cd ..
- uninstall:
- rm -f $(DESTDIR)$(MANDIR)/man8/$(PROG).8
- rm -f $(DESTDIR)$(BINDIR)/$(PROG)
- rm -fR $(DESTDIR)$(SHAREDIR)
- rm -fR $(DESTDIR)$(DOCDIR)
- strip: @PROG@
- strip $(PROG)
- distro: distclean
- cd .. && tar cvfz $(PROG)-$(VERSION).tar.gz ./$(PROG)-$(VERSION) --exclude *.prj --exclude *.spec --exclude *.so && mv $(PROG)-$(VERSION).tar.gz ./$(PROG)-$(VERSION)/ && cd $(PROG)-$(VERSION)
- clean:
- rm -f $(DESTS) $(MISSDESTS) $(PROG)
- rm -f *.bak ./src/*.bak ./src/*/*.bak
- rm -f core *.core
- cd plugins && make clean && cd ..
- distclean: clean
- rm -f config.h config.cache config.log config.status
- rm -f $(PROG)-*.tar.gz
- rm -f $(PROG)-*.rpm
- rm -f $(PROG).8
- rm -f *.log
- rm -f Makefile *~
- cd plugins && make distclean && cd ..
- rm -f plugins/Makefile
- rm -f ec_*.so
- # only for me...
- rpm: distro
- rm -f $(PROG)-*.rpm
- cp -f $(PROG)-$(VERSION).tar.gz /usr/src/redhat/SOURCES/
- rpm -ba $(PROG).spec
- mv /usr/src/redhat/RPMS/i?86/$(PROG)-$(VERSION)-@RELEASE@.i?86.rpm ./
- mv /usr/src/redhat/SRPMS/$(PROG)-$(VERSION)-@RELEASE@.src.rpm ./
- rm -Rf /usr/src/redhat/*/ettercap*
- chmod 644 $(PROG)-$(VERSION)*
- targz: distro
- mv $(PROG)-$(VERSION).tar.gz $(PROG)-$(VERSION)-@SERIAL@.tar.gz
- chmod 644 $(PROG)-$(VERSION)-@SERIAL@.tar.gz