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/] [Makefile.mk] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 ZTEX
# This Makef^ile defines the standard rules for building the project.
2 2 ZTEX
#
3
# The following variables are used:
4
#
5
# ZTEXPREFIX
6
#   Defines the location of the EZ-USB SDK
7
#   Must be defined!
8
#   Example: ZTEXPREFIX=../../..
9
#
10
# JARTARGET
11
#   The name of the jar archive
12
#   Example: JARTARGET=UCEcho.jar
13
#
14
# CLASSTARGETS
15
#   Java Classes that have to be build
16
#   Example: CLASSTARGETS=UCEcho.class
17
#
18
# CLASSEXTRADEPS
19
#   Extra dependencies for Java Classes
20 6 ZTEX
#   Example: CLASSEXTRADEPS:=$(wildcard $(ZTEXPREFIX)/java/ztex/*.java)
21 2 ZTEX
#
22
# IHXTARGETS
23
#   ihx files (firmware ROM files) that have to be build
24
#   Example: IHXTARGETS=ucecho.ihx
25
#
26
# IHXEXTRADEPS
27
#   Extra Dependencies for ihx files
28 6 ZTEX
#   Example: IHXEXTRADEPS:=$(wildcard $(ZTEXPREFIX)/include/*.h)
29 2 ZTEX
#
30
# EXTRAJARFILES
31
#   Extra files that should be included into the jar archive
32
#   Example: EXTRAJARFILES=ucecho.ihx fpga/ucecho.bin
33 5 ZTEX
# EXTRAJARFLAGS
34
#   Extra flags for the jar command
35
#   Example: EXTRAJARFLAGS=-C com
36 2 ZTEX
 
37
# EXTRACLEANFILES
38
#   Extra files that should be cleaned by target "clean"
39
 
40
# EXTRADISTCLEANFILES
41
#   Extra files that should be cleaned by target "distclean"
42
 
43
 
44 6 ZTEX
.PHONY: all ihx jar clean distclean default avr avrclean avrdistclean
45
.SUFFIXES: .ihx .class .jar .java .c
46 2 ZTEX
 
47
JAVAC=javac
48
SDCC=$(ZTEXPREFIX)/bin/bmpsdcc.sh
49
CLASSPATH:=.:$(ZTEXPREFIX)/libusbJava:$(ZTEXPREFIX)/java:$(CLASSPATH)
50
INCLUDES=-I $(ZTEXPREFIX)/include/
51
 
52
all : ihx jar
53
ihx : $(IHXTARGETS)
54
jar : $(JARTARGET)
55
 
56
%.ihx: %.c $(IHXEXTRADEPS)
57
        $(SDCC) $< "$(INCLUDES)"
58
 
59
%.class: %.java $(CLASSEXTRADEPS)
60
        $(JAVAC) -cp "$(CLASSPATH)" $<
61
 
62
$(JARTARGET) : $(CLASSTARGETS) $(EXTRAJARFILES)
63 5 ZTEX
        jar cf $(JARTARGET) *.class $(EXTRAJARFILES) $(EXTRAJARFLAGS) -C $(ZTEXPREFIX)/libusbJava . $(shell cd $(ZTEXPREFIX)/java; ls ztex/*.class | while read a; do echo "-C $(ZTEXPREFIX)/java $$a"; done)
64 2 ZTEX
 
65
clean:
66
        rm -f *~ *.bak *.old
67
        rm -f *.class
68
        rm -f *.rel *.rst *.lnk *.lst *.map *.asm *.sym *.mem *.tmp.c
69
        rm -f $(EXTRACLEANFILES)
70
 
71
distclean: clean
72
        rm -f $(JARTARGET)
73
        rm -f *.ihx
74
        rm -f $(EXTRADISTCLEANFILES)
75 6 ZTEX
 
76
avr:
77
        if [ -d avr ]; then make -C avr all; fi
78
 
79
avrclean:
80
        if [ -d avr ]; then make -C avr clean; fi
81
 
82
avrdistclean:
83
        if [ -d avr ]; then make -C avr distclean; fi

powered by: WebSVN 2.1.0

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