Some Makefile love
This commit is contained in:
parent
e96b027dee
commit
301008cd0c
8
Makefile
8
Makefile
|
@ -1,16 +1,18 @@
|
|||
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
|
||||
|
|
|
@ -35,14 +35,14 @@ main.o: main.c
|
|||
$(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
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
TARGET_PREFIX=lm32-elf-
|
||||
|
||||
RM ?= rm -f
|
||||
|
||||
CC_normal := $(TARGET_PREFIX)gcc
|
||||
CX_normal := $(TARGET_PREFIX)g++
|
||||
AS_normal := $(TARGET_PREFIX)as
|
||||
|
|
|
@ -21,4 +21,4 @@ libbase.a: $(OBJECTS)
|
|||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(OBJECTS:.o=.ts) $(OBJECTS:.o=.d) libbase.a .*~ *~
|
||||
$(RM) $(OBJECTS) $(OBJECTS:.o=.ts) $(OBJECTS:.o=.d) libbase.a .*~ *~
|
||||
|
|
|
@ -22,4 +22,4 @@ libcompiler-rt.a: $(OBJECTS)
|
|||
.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 .*~ *~
|
||||
|
|
|
@ -21,4 +21,4 @@ libnet.a: $(OBJECTS)
|
|||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(OBJECTS:.o=.ts) $(OBJECTS:.o=.d) libnet.a .*~ *~
|
||||
$(RM) $(OBJECTS) $(OBJECTS:.o=.ts) $(OBJECTS:.o=.d) libnet.a .*~ *~
|
||||
|
|
|
@ -55,15 +55,15 @@ dvisampler0.o: dvisampler0.h
|
|||
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
|
||||
|
|
|
@ -6,6 +6,8 @@ SOURCES=tb_s6ddrphy.v ../../verilog/s6ddrphy/s6ddrphy.v \
|
|||
$(XILINX)/verilog/src/unisims/OBUFT.v \
|
||||
$(XILINX)/verilog/src/unisims/BUFPLL.v
|
||||
|
||||
RM ?= rm -f
|
||||
|
||||
all: tb_s6ddrphy
|
||||
|
||||
isim: tb_s6ddrphy
|
||||
|
@ -15,9 +17,9 @@ cversim: $(SOURCES)
|
|||
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
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
TARGETS=mkmmimg flterm byteswap
|
||||
CC=gcc
|
||||
RM ?= rm -f
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
|
@ -10,7 +11,7 @@ install: mkmmimg flterm
|
|||
install -d /usr/local/bin
|
||||
install -m755 -t /usr/local/bin $^
|
||||
|
||||
.PHONY: clean install
|
||||
.PHONY: all clean install
|
||||
|
||||
clean:
|
||||
rm -f $(TARGETS)
|
||||
$(RM) $(TARGETS)
|
||||
|
|
Loading…
Reference in New Issue