Makefile 478 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
PREFIX  ?= /usr/local
STAGING ?=
EB      ?= ../submodules/wr-cores/ip_cores/etherbone-core/api
TARGETS := eb-flash eb-info eb-console

EXTRA_FLAGS ?=
CFLAGS      ?= $(EXTRA_FLAGS) -Wall -O2 -I $(EB)
LIBS        ?= -L $(EB) -Wl,-rpath,$(PREFIX)/lib -letherbone

all:	$(TARGETS)
clean:
	rm -f $(TARGETS)
install:
	mkdir -p $(STAGING)$(PREFIX)/bin
	cp $(TARGETS) $(STAGING)$(PREFIX)/bin

%:	%.c
	gcc $(CFLAGS) -o $@ $< $(LIBS)

%:	%.cpp
	g++ $(CFLAGS) -o $@ $< $(LIBS) -leca -ltlu