+RM ?= rm -f
+
all: build/top.bit build/top.fpg
build/top.bit build/top.bin:
./build.py
build/top.fpg: build/top.bin
- make -C tools
+ $(MAKE) -C tools
tools/byteswap $< $@
load: build/top.bit
jtag -n load.jtag
clean:
- rm -rf build/*
+ $(RM) -r build/*
-.PHONY: load clean
+.PHONY: all load clean
$(assemble)
libs:
- make -C $(M2DIR)/software/libcompiler-rt
- make -C $(M2DIR)/software/libbase
- make -C $(M2DIR)/software/libnet
+ $(MAKE) -C $(M2DIR)/software/libcompiler-rt
+ $(MAKE) -C $(M2DIR)/software/libbase
+ $(MAKE) -C $(M2DIR)/software/libnet
flash: bios.bin
m1nor bios.bin
clean:
- rm -f $(OBJECTS) $(OBJECTS:.o=.d) bios.elf bios.bin bios-rescue.elf bios-rescue.bin .*~ *~
+ $(RM) $(OBJECTS) $(OBJECTS:.o=.d) bios.elf bios.bin bios-rescue.elf bios-rescue.bin .*~ *~
-.PHONY: main.o clean libs flash
+.PHONY: all main.o clean libs flash
TARGET_PREFIX=lm32-elf-
+RM ?= rm -f
+
CC_normal := $(TARGET_PREFIX)gcc
CX_normal := $(TARGET_PREFIX)g++
AS_normal := $(TARGET_PREFIX)as
.PHONY: clean
clean:
- rm -f $(OBJECTS) $(OBJECTS:.o=.ts) $(OBJECTS:.o=.d) libbase.a .*~ *~
+ $(RM) $(OBJECTS) $(OBJECTS:.o=.ts) $(OBJECTS:.o=.d) libbase.a .*~ *~
.PHONY: clean
clean:
- rm -f $(OBJECTS) $(OBJECTS:.o=.ts) $(OBJECTS:.o=.d) libcompiler-rt.a .*~ *~
+ $(RM) $(OBJECTS) $(OBJECTS:.o=.ts) $(OBJECTS:.o=.d) libcompiler-rt.a .*~ *~
.PHONY: clean
clean:
- rm -f $(OBJECTS) $(OBJECTS:.o=.ts) $(OBJECTS:.o=.d) libnet.a .*~ *~
+ $(RM) $(OBJECTS) $(OBJECTS:.o=.ts) $(OBJECTS:.o=.d) libnet.a .*~ *~
dvisampler1.o: dvisampler1.h
libs:
- make -C $(M2DIR)/software/libcompiler-rt
- make -C $(M2DIR)/software/libbase
+ $(MAKE) -C $(M2DIR)/software/libcompiler-rt
+ $(MAKE) -C $(M2DIR)/software/libbase
load: videomixer.bin
- make -C $(M2DIR)/tools
+ $(MAKE) -C $(M2DIR)/tools
$(M2DIR)/tools/flterm --port /dev/ttyUSB0 --kernel videomixer.bin
clean:
- rm -f $(OBJECTS) $(OBJECTS:.o=.d) videomixer.elf videomixer.bin .*~ *~
- rm -f dvisampler0.h dvisampler0.c dvisampler1.h dvisampler1.c
+ $(RM) $(OBJECTS) $(OBJECTS:.o=.d) videomixer.elf videomixer.bin .*~ *~
+ $(RM) dvisampler0.h dvisampler0.c dvisampler1.h dvisampler1.c
-.PHONY: main.o clean libs load
+.PHONY: all main.o clean libs load
$(XILINX)/verilog/src/unisims/OBUFT.v \
$(XILINX)/verilog/src/unisims/BUFPLL.v
+RM ?= rm -f
+
all: tb_s6ddrphy
isim: tb_s6ddrphy
cver $(SOURCES)
clean:
- rm -f tb_s6ddrphy verilog.log s6ddrphy.vcd
+ $(RM) tb_s6ddrphy verilog.log s6ddrphy.vcd
tb_s6ddrphy: $(SOURCES)
iverilog -o tb_s6ddrphy $(SOURCES)
-.PHONY: clean sim cversim
+.PHONY: all clean isim cversim
TARGETS=mkmmimg flterm byteswap
CC=gcc
+RM ?= rm -f
all: $(TARGETS)
install -d /usr/local/bin
install -m755 -t /usr/local/bin $^
-.PHONY: clean install
+.PHONY: all clean install
clean:
- rm -f $(TARGETS)
+ $(RM) $(TARGETS)