OpenCores
URL https://opencores.org/ocsvn/usb_fpga_1_15/usb_fpga_1_15/trunk

Subversion Repositories usb_fpga_1_15

[/] [usb_fpga_1_15/] [trunk/] [java/] [Makefile] - Diff between revs 2 and 3

Show entire file | Details | Blame | View Log

Rev 2 Rev 3
Line 1... Line 1...
#########################
DIRS=ztex FWLoader DeviceServer
# configuration section #
 
#########################
 
 
 
ZTEXPREFIX=..
.PHONY: default all clean distclean avr avrclean avrdistclean
 
 
#PREFIX  base directory for installing
default:
#default: /usr/local for OS=UNIX and c:\usr else
        @echo "This makefile is intended to clean up the project or to build all examples in this subdirectory"
#e.g. PREFIX=/usr
        @echo "Usage: make all | clean | distclean"
 
 
#JAVADIR  where to install jar's
all:
#default: $(PREFIX)/share/java
        set -e; for i in $(DIRS); do make -C $$i all; done
 
 
#BINDIR  where to install bin's
clean:
#default: $(PREFIX)/bin
        set -e; for i in $(DIRS); do make -C $$i clean; done
 
 
#MANDIR  where to install mans's
 
#default: $(PREFIX)/share/man/man1
 
 
 
################################
 
# DO NOT CHANAGE THE FOLLOWING #
 
################################
 
 
 
.PHONY: all jar clean distclean install
 
 
 
JARTARGET=FWLoader.jar
 
CLASSTARGETS=FWLoader.class
 
 
 
JAVAC=javac
 
INSTALL=install
 
INSTALLDIR=$(INSTALL) -d
 
INSTALLEXE=$(INSTALL) -m 0755
 
INSTALLFILE=$(INSTALL) -m 0644
 
 
 
CLASSPATH:=.:$(ZTEXPREFIX)/libusbJava:$(ZTEXPREFIX)/java:/usr/local/share/java:/usr/share/java:$(CLASSPATH)
 
CLASSEXTRADEPS:=$(wildcard ztex/*.java)
 
 
 
ifndef PREFIX
 
  PREFIX=/usr/local
 
endif
 
 
 
ifndef JAVADIR
 
  JAVADIR=$(PREFIX)/share/java
 
endif
 
 
 
ifndef BINDIR
 
  BINDIR=$(DESTDIR)$(PREFIX)/bin
 
endif
 
 
 
ifndef MANDIR
 
  MANDIR=$(DESTDIR)$(PREFIX)/share/man/man1
 
endif
 
 
 
all : jar
 
 
 
jar : $(JARTARGET)
 
 
 
%.class: %.java $(CLASSEXTRADEPS)
distclean:
        $(JAVAC) -cp "$(CLASSPATH)" $< $(CLASSEXTRADEPS)
        set -e; for i in $(DIRS); do make -C $$i distclean; done
 
 
$(JARTARGET) : $(CLASSTARGETS) $(EXTRAJARFILES)
avr:
        jar cf $(JARTARGET) *.class $(EXTRAJARFILES) -C $(ZTEXPREFIX)/libusbJava . $(shell cd $(ZTEXPREFIX)/java; ls ztex/*.class | while read a; do echo "-C $(ZTEXPREFIX)/java $$a"; done)
        set -e; for i in $(DIRS); do make -C $$i avr; done
 
 
install: $(CLASSTARGETS)
avrclean:
#       $(INSTALLDIR) $(JAVADIR)
        set -e; for i in $(DIRS); do make -C $$i avrclean; done
#       jar cf $(JAVADIR)/ztex.jar *.class ztex/*.class
 
        $(INSTALLDIR) $(JAVADIR)/ztex
 
        $(INSTALLFILE) *.class $(JAVADIR)
 
        $(INSTALLFILE) ztex/*.class $(JAVADIR)/ztex
 
        $(INSTALLDIR) $(BINDIR)
 
        $(INSTALLEXE) FWLoader $(BINDIR)
 
        $(INSTALLDIR) $(MANDIR)
 
        $(INSTALLFILE) FWLoader.1 $(MANDIR)
 
 
 
clean:
avrdistclean:
        rm -f *~ *.bak *.old
        set -e; for i in $(DIRS); do make -C $$i avrdistclean; done
        rm -f ztex/*~ ztex/*.bak ztex/*.old
 
        rm -f *.class
 
        rm -f *.rel *.rst *.lnk *.lst *.map *.asm *.sym *.mem *.tmp.c
 
 
 
distclean: clean
 
        rm -f $(JARTARGET)
 
        rm -f ztex/*.class
 
        rm -f *.ihx
 
        set -e; for i in $(DIRS); do make -C $$i avrdistclean; done
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.