From 05b6bf30040b7d3f2219919168b4c159045a909b Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sat, 6 Mar 2010 11:23:06 +0100 Subject: [PATCH] move source files to own subdirectory --- .gitignore | 4 ---- Makefile | 19 +++++++------------ src/.gitignore | 5 +++++ src/Makefile | 18 ++++++++++++++++++ filesystem.c => src/filesystem.c | 0 filesystem.h => src/filesystem.h | 0 firmware.c => src/firmware.c | 0 rsb-crc.c => src/rsb-crc.c | 0 rsb-crc.h => src/rsb-crc.h | 0 rsb-lz.c => src/rsb-lz.c | 0 rsb-lz.h => src/rsb-lz.h | 0 11 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 src/.gitignore create mode 100644 src/Makefile rename filesystem.c => src/filesystem.c (100%) rename filesystem.h => src/filesystem.h (100%) rename firmware.c => src/firmware.c (100%) rename rsb-crc.c => src/rsb-crc.c (100%) rename rsb-crc.h => src/rsb-crc.h (100%) rename rsb-lz.c => src/rsb-lz.c (100%) rename rsb-lz.h => src/rsb-lz.h (100%) diff --git a/.gitignore b/.gitignore index b861e4c..1f5a488 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,2 @@ -filesystem.o firmware -firmware.o -rsb-crc.o -rsb-lz.o extracted diff --git a/Makefile b/Makefile index 15de0a8..8517dff 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,13 @@ -CFLAGS=-Wall -O3 +all: firmware -all: firmware +firmware: src/firmware + ln -s $^ $@ -firmware: firmware.o rsb-crc.o rsb-lz.o filesystem.o - -firmware.o: firmware.c rsb-crc.h filesystem.h - -rsb-crc.o: rsb-crc.c rsb-crc.h - -rsb-lz.o: rsb-lz.c rsb-lz.h - -filesystem.o: filesystem.c filesystem.h rsb-lz.h +src/firmware: + $(MAKE) -C src firmware clean: - rm -f firmware firmware.o rsb-crc.o rsb-lz.o filesystem.o + rm -f firmware + $(MAKE) -C src clean .PHONY: all clean diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..8112a8e --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,5 @@ +filesystem.o +firmware +firmware.o +rsb-crc.o +rsb-lz.o diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..15de0a8 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,18 @@ +CFLAGS=-Wall -O3 + +all: firmware + +firmware: firmware.o rsb-crc.o rsb-lz.o filesystem.o + +firmware.o: firmware.c rsb-crc.h filesystem.h + +rsb-crc.o: rsb-crc.c rsb-crc.h + +rsb-lz.o: rsb-lz.c rsb-lz.h + +filesystem.o: filesystem.c filesystem.h rsb-lz.h + +clean: + rm -f firmware firmware.o rsb-crc.o rsb-lz.o filesystem.o + +.PHONY: all clean diff --git a/filesystem.c b/src/filesystem.c similarity index 100% rename from filesystem.c rename to src/filesystem.c diff --git a/filesystem.h b/src/filesystem.h similarity index 100% rename from filesystem.h rename to src/filesystem.h diff --git a/firmware.c b/src/firmware.c similarity index 100% rename from firmware.c rename to src/firmware.c diff --git a/rsb-crc.c b/src/rsb-crc.c similarity index 100% rename from rsb-crc.c rename to src/rsb-crc.c diff --git a/rsb-crc.h b/src/rsb-crc.h similarity index 100% rename from rsb-crc.h rename to src/rsb-crc.h diff --git a/rsb-lz.c b/src/rsb-lz.c similarity index 100% rename from rsb-lz.c rename to src/rsb-lz.c diff --git a/rsb-lz.h b/src/rsb-lz.h similarity index 100% rename from rsb-lz.h rename to src/rsb-lz.h -- 2.39.5