# http://neil.franklin.ch/Projects/VirtexTools/Makefile # author Neil Franklin, last modification 2002.10.14 # base path of where to install into PREFIX = /usr/local # --- no user configurable stuff below here SOLINKS = virtex.h readbitfile readfileheader readstreamheader \ setmodelfromconfigsize allocframes readmainframes setclbrange \ getclb getlut getff LutFont DIR = VirtexTools all: vd vv virtex.o: virtex.c virtex.h @echo making virtex.o by compiling virtex.c ... @cc -c virtex.c libvirtex.a: virtex.o @echo making libvirtex.a by archiving virtex.o ... @ar cru libvirtex.a virtex.o @ranlib libvirtex.a vd: vd.c virtex.h libvirtex.a @echo making vd by compiling vd.c ... # @cc -o vd vd.c libvirtex.a @cc -o vd vd.c libvirtex.a /usr/local/lib/libefence.a vv: vv.c virtex.h libvirtex.a @echo making vv by compiling vv.c ... # @cc -o vv vv.c libvirtex.a @cc -o vv vv.c libvirtex.a /usr/local/lib/libefence.a install: @echo installing library and include ... @mkdir -p $(PREFIX)/lib @cp -p libvirtex.a $(PREFIX)/lib @mkdir -p $(PREFIX)/include @cp -p virtex.h $(PREFIX)/include @echo installing programs ... @mkdir -p $(PREFIX)/bin @cp -p vd $(PREFIX)/bin @cp -p vv $(PREFIX)/bin @echo installing man pages ... @mkdir -p $(PREFIX)/man/man1 @cp -p vd.1 $(PREFIX)/man/man1 @cp -p vv.1 $(PREFIX)/man/man1 @mkdir -p $(PREFIX)/man/man3 @cp -p libvirtex.3 $(PREFIX)/man/man3 @for SO in $(SOLINKS) ; do \ echo ".so man3/libvirtex.3" > $(PREFIX)/man/man3/$${SO}.3 ; \ done @mkdir -p $(PREFIX)/man/man7 @cp -p VirtexTools.7 $(PREFIX)/man/man7 uninstall: @echo uninstalling programs ... @rm $(PREFIX)/lib/libvirtex.a @rm $(PREFIX)/include/virtex.h @rm $(PREFIX)/bin/vd @rm $(PREFIX)/bin/vv @echo uninstalling man pages ... @rm $(PREFIX)/man/man1/vd.1 @rm $(PREFIX)/man/man1/vv.1 @rm $(PREFIX)/man/man3/libvirtex.3 @for SO in $(SOLINKS) ; do \ rm $(PREFIX)/man/man3/$${SO}.3 ; \ done @rm $(PREFIX)/man/man7/VirtexTools.7 vtlogo: @echo generating VirtexTools website logo ... @javac vtlogo.java @java vtlogo @vv -r 0-34L/0-5F vtlogo.bit | convert - vtlogo.png ci: @# the -r?.? has to fixed before each make ci @# best on the first Makefile edit after last make ci @echo checking source files into RCS archive ... @ci -l -r1.8 FAQ INSTALL Makefile README VirtexTools.7 index.html.en \ libvirtex.3 vd.1 vd.c virtex.c virtex.h vtlogo.java vv.1 vv.c tar: @# package this project into an .tar.gz for one single nice download @# that .tar.gz should be outside and parallel to the work dir @echo packaging source and doc files into an .tar.gz ... @tar zcf ../$(DIR).tar.gz -C .. \ $(DIR)/FAQ $(DIR)/Logfile $(DIR)/INSTALL $(DIR)/Makefile $(DIR)/RCS \ $(DIR)/README $(DIR)/VirtexTools.7 $(DIR)/index.html.de \ $(DIR)/index.html.en $(DIR)/libvirtex.3 $(DIR)/vd.1 $(DIR)/vd.c \ $(DIR)/virtex.c $(DIR)/virtex.h $(DIR)/vtlogo.java $(DIR)/vv.1 \ $(DIR)/vv.c