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

Subversion Repositories or1k_soc_on_altera_embedded_dev_kit

[/] [or1k_soc_on_altera_embedded_dev_kit/] [trunk/] [soc/] [sw/] [adv_jtag_bridge/] [Makefile] - Blame information for rev 12

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

Line No. Rev Author Line
1 12 xianfeng
prefix = /usr/local
2
 
3
# Your build environment. selects libs, lib dirs, and include dirs
4
# Supported: linux, cygwin
5
BUILD_ENVIRONMENT=linux
6
 
7
# Set this to 'true' if you want to build for the legacy debug unit ('debug_if' core),
8
# leave 'false' if you are building for the Advanced Debug Unit.
9
SUPPORT_LEGACY=false
10
 
11
# Set this to 'true' to include support for cables which require libusb
12
# currently includes Altera USB-Blaster and Xilinx XPC DLC8
13
SUPPORT_USB_CABLES=true
14
 
15
# Set this to 'true' to support cables which require libFTDI
16
# SUPPORT_USB_CABLES must also be set to 'true' to support FTDI-based cables.
17
SUPPORT_FTDI_CABLES=true
18
 
19
 
20
# ----------------------------------------------------------------------------
21
# Most people shouldn't have to change anything below this line
22
 
23
ifeq ($(BUILD_ENVIRONMENT),linux)
24
# These are for native Linux.  You may need to put the path to libusb into the LIBS variable
25
# with the -L command.
26
CFLAGS = -g -O2 -Wall
27
CC = gcc
28
LIBS = -lpthread
29
INCLUDEDIRS = -I/usr/local/include/libusb-1.0/ -I/usr/local/include/
30
 
31
else
32
 
33
ifeq ($(BUILD_ENVIRONMENT),cygwin)
34
# These are for cygwin.  It assumes libusb.a is in the current directory.
35
CFLAGS = -g -O2 -Wall
36
CC = gcc
37
LIBS = -L. -lioperm -lpthread
38
INCLUDEDIRS = -I/usr/local/include/
39
endif
40
 
41
endif
42
 
43
ifeq ($(SUPPORT_LEGACY),true)
44
CFLAGS +=  -D__LEGACY__
45
endif
46
 
47
 
48
PROGRAMS = adv_jtag_bridge
49
 
50
HEADERS = adv_jtag_bridge.h chain_commands.h opencores_tap.h \
51
        altera_virtual_jtag.h rsp-server.h bsdl.h or32_selftest.c cable_common.h \
52
        cable_parallel.h cable_sim.h \
53
        bsdl_parse.h errcodes.h spr-defs.h except.h adv_dbg_commands.h dbg_api.h \
54
        legacy_dbg_commands.h
55
 
56
SOURCES = adv_jtag_bridge.c rsp-server.c chain_commands.c cable_common.c bsdl.c \
57
        or32_selftest.c cable_parallel.c cable_sim.c \
58
        bsdl_parse.c errcodes.c adv_dbg_commands.c dbg_api.c legacy_dbg_commands.c
59
 
60
OBJECTS = adv_jtag_bridge.o rsp-server.o chain_commands.o cable_common.o bsdl.o \
61
        or32_selftest.o cable_parallel.o cable_sim.o \
62
        bsdl_parse.o errcodes.o adv_dbg_commands.o dbg_api.o legacy_dbg_commands.o
63
 
64
 
65
ifeq ($(SUPPORT_USB_CABLES),true)
66
CFLAGS += -D__SUPPORT_USB_CABLES__
67
HEADERS += cable_usbblaster.h cable_xpc_dlc9.h
68
SOURCES += cable_usbblaster.c cable_xpc_dlc9.c
69
OBJECTS += cable_usbblaster.o cable_xpc_dlc9.o
70
 
71
ifeq ($(SUPPORT_FTDI_CABLES),true)
72
CFLAGS += -D__SUPPORT_FTDI_CABLES__
73
LIBS += -lftdi
74
HEADERS += cable_ft2232.h
75
SOURCES += cable_ft2232.c
76
OBJECTS += cable_ft2232.o
77
endif
78
 
79
# libusb must follow libftdi in the list of libraries
80
LIBS += -lusb
81
endif
82
 
83
 
84
all: $(PROGRAMS)
85
 
86
default: $(PROGRAMS)
87
 
88
.c.o:
89
        $(CC) $(CFLAGS) -c $<
90
 
91
adv_jtag_bridge: Makefile $(OBJECTS) $(HEADERS)
92
        rm -f $@
93
        $(CC) -o $@ $(CFLAGS) $(OBJECTS) $(LIBS) $(INCLUDEDIRS)
94
 
95
 
96
install: all
97
        [ -d $(prefix)/bin ] || mkdir -p $(prefix)/bin
98
        for p in $(PROGRAMS) ; do \
99
            /bin/rm -f $(prefix)/bin/$$p; \
100
            /bin/cp -p $$p $(prefix)/bin/$$p; \
101
        done
102
 
103
clean: Makefile
104
        rm -f $(PROGRAMS) *.o *~

powered by: WebSVN 2.1.0

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