Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 9 files changed
  • 0 commit comments
  • 2 contributors
Commits on May 12, 2013
Yann Sionneau fallen Some Makefile love 301008c
Commits on May 13, 2013
Sébastien Bourdeauducq sbourdeauducq Merge pull request #1 from fallen/makefile-001
Some Makefile love
6bf6477
8 Makefile
View
@@ -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
10 software/bios/Makefile
View
@@ -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
2  software/common.mak
View
@@ -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
2  software/libbase/Makefile
View
@@ -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 .*~ *~
2  software/libcompiler-rt/Makefile
View
@@ -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 .*~ *~
2  software/libnet/Makefile
View
@@ -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 .*~ *~
12 software/videomixer/Makefile
View
@@ -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 tb/s6ddrphy/Makefile
View
@@ -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
5 tools/Makefile
View
@@ -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)

No commit comments for this range

Something went wrong with that request. Please try again.