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

Subversion Repositories usb_fpga_1_11

[/] [usb_fpga_1_11/] [trunk/] [java/] [Makefile] - Blame information for rev 6

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ZTEX
#########################
2
# configuration section #
3
#########################
4
 
5
ZTEXPREFIX=..
6
 
7 6 ZTEX
#PREFIX  base directory for installing
8
#default: /usr/local for OS=UNIX and c:\usr else
9
#e.g. PREFIX=/usr
10 2 ZTEX
 
11 6 ZTEX
#JAVADIR  where to install jar's
12
#default: $(PREFIX)/share/java
13
 
14
#BINDIR  where to install bin's
15
#default: $(PREFIX)/bin
16
 
17
#MANDIR  where to install mans's
18
#default: $(PREFIX)/share/man/man1
19
 
20 2 ZTEX
################################
21
# DO NOT CHANAGE THE FOLLOWING #
22
################################
23
 
24 6 ZTEX
.PHONY: all jar clean distclean install
25 2 ZTEX
 
26 6 ZTEX
JARTARGET=FWLoader.jar
27
CLASSTARGETS=FWLoader.class
28
 
29 2 ZTEX
JAVAC=javac
30 6 ZTEX
INSTALL=install
31
INSTALLDIR=$(INSTALL) -d
32
INSTALLEXE=$(INSTALL) -m 0755
33
INSTALLFILE=$(INSTALL) -m 0644
34 2 ZTEX
 
35 6 ZTEX
CLASSPATH:=.:$(ZTEXPREFIX)/libusbJava:$(ZTEXPREFIX)/java:/usr/local/share/java:/usr/share/java:$(CLASSPATH)
36
CLASSEXTRADEPS:=$(wildcard ztex/*.java)
37
 
38
ifndef PREFIX
39
  PREFIX=/usr/local
40
endif
41
 
42
ifndef JAVADIR
43
  JAVADIR=$(PREFIX)/share/java
44
endif
45
 
46
ifndef BINDIR
47
  BINDIR=$(DESTDIR)$(PREFIX)/bin
48
endif
49
 
50
ifndef MANDIR
51
  MANDIR=$(DESTDIR)$(PREFIX)/share/man/man1
52
endif
53
 
54 2 ZTEX
all : jar
55
 
56 6 ZTEX
jar : $(JARTARGET)
57 2 ZTEX
 
58
%.class: %.java $(CLASSEXTRADEPS)
59
        $(JAVAC) -cp "$(CLASSPATH)" $< $(CLASSEXTRADEPS)
60
 
61
$(JARTARGET) : $(CLASSTARGETS) $(EXTRAJARFILES)
62
        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)
63
 
64 6 ZTEX
install: $(CLASSTARGETS)
65
#       $(INSTALLDIR) $(JAVADIR)
66
#       jar cf $(JAVADIR)/ztex.jar *.class ztex/*.class
67
        $(INSTALLDIR) $(JAVADIR)/ztex
68
        $(INSTALLFILE) *.class $(JAVADIR)
69
        $(INSTALLFILE) ztex/*.class $(JAVADIR)/ztex
70
        $(INSTALLDIR) $(BINDIR)
71
        $(INSTALLEXE) FWLoader $(BINDIR)
72
        $(INSTALLDIR) $(MANDIR)
73
        $(INSTALLFILE) FWLoader.1 $(MANDIR)
74
 
75 2 ZTEX
clean:
76
        rm -f *~ *.bak *.old
77 3 ZTEX
        rm -f ztex/*~ ztex/*.bak ztex/*.old
78 2 ZTEX
        rm -f *.class
79
        rm -f *.rel *.rst *.lnk *.lst *.map *.asm *.sym *.mem *.tmp.c
80
 
81
distclean: clean
82
        rm -f $(JARTARGET)
83
        rm -f ztex/*.class
84
        rm -f *.ihx

powered by: WebSVN 2.1.0

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