mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
build: tools: also declutter sourcecode
This commit is contained in:
@@ -24,7 +24,7 @@ OBJS = ${SRCS:%.c=$(BUILDDIR)%.rel}
|
|||||||
OBJS += uip/$(BUILDDIR)/timer.rel uip/$(BUILDDIR)/uip-fw.rel uip/$(BUILDDIR)/uip-neighbor.rel uip/$(BUILDDIR)/uip-split.rel uip/$(BUILDDIR)/uip.rel uip/$(BUILDDIR)/uip_arp.rel uip/$(BUILDDIR)/uiplib.rel httpd/$(BUILDDIR)/httpd.rel httpd/$(BUILDDIR)/page_impl.rel
|
OBJS += uip/$(BUILDDIR)/timer.rel uip/$(BUILDDIR)/uip-fw.rel uip/$(BUILDDIR)/uip-neighbor.rel uip/$(BUILDDIR)/uip-split.rel uip/$(BUILDDIR)/uip.rel uip/$(BUILDDIR)/uip_arp.rel uip/$(BUILDDIR)/uiplib.rel httpd/$(BUILDDIR)/httpd.rel httpd/$(BUILDDIR)/page_impl.rel
|
||||||
|
|
||||||
html_data.c html_data.h: html tools
|
html_data.c html_data.h: html tools
|
||||||
tools/fileadder -a $(HTML_LOCATION) -s $(IMAGESIZE) -b BANK1 -d html -p html_data
|
tools/$(BUILDDIR)fileadder -a $(HTML_LOCATION) -s $(IMAGESIZE) -b BANK1 -d html -p html_data
|
||||||
|
|
||||||
httpd: html_data.h
|
httpd: html_data.h
|
||||||
|
|
||||||
@@ -59,8 +59,8 @@ $(BUILDDIR)rtlplayground.bin: $(BUILDDIR)rtlplayground.img
|
|||||||
cat $< >> $@
|
cat $< >> $@
|
||||||
truncate --size=16K $@
|
truncate --size=16K $@
|
||||||
dd if=$< skip=80 bs=1024 >>$@
|
dd if=$< skip=80 bs=1024 >>$@
|
||||||
tools/fileadder -a $(CONFIG_LOCATION) -s $(IMAGESIZE) -d config.txt $@
|
tools/$(BUILDDIR)fileadder -a $(CONFIG_LOCATION) -s $(IMAGESIZE) -d config.txt $@
|
||||||
tools/fileadder -a $(HTML_LOCATION) -s $(IMAGESIZE) -d html -p html_data $@
|
tools/$(BUILDDIR)fileadder -a $(HTML_LOCATION) -s $(IMAGESIZE) -d html -p html_data $@
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean all $(SUBDIRS)
|
.PHONY: clean all $(SUBDIRS)
|
||||||
+9
-5
@@ -1,16 +1,20 @@
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
CCFLAGS = -Wall -o
|
CCFLAGS = -Wall -o
|
||||||
|
BUILDDIR = output/
|
||||||
|
|
||||||
all: injector fileadder httpd_sim
|
all: create_build_dir $(BUILDDIR)injector $(BUILDDIR)fileadder $(BUILDDIR)httpd_sim
|
||||||
|
|
||||||
|
create_build_dir:
|
||||||
|
mkdir -p $(BUILDDIR)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm *.o
|
rm -r $(BUILDDIR)
|
||||||
|
|
||||||
injector: injector.c
|
$(BUILDDIR)injector: injector.c
|
||||||
gcc $^ $(CCFLAGS) $@
|
gcc $^ $(CCFLAGS) $@
|
||||||
|
|
||||||
fileadder: fileadder.c
|
$(BUILDDIR)fileadder: fileadder.c
|
||||||
gcc $^ $(CCFLAGS) $@
|
gcc $^ $(CCFLAGS) $@
|
||||||
|
|
||||||
httpd_sim: httpd_sim.c httpd_sim.h
|
$(BUILDDIR)httpd_sim: httpd_sim.c httpd_sim.h
|
||||||
gcc $< $(CCFLAGS) $@ -I/usr/include/json-c -ljson-c
|
gcc $< $(CCFLAGS) $@ -I/usr/include/json-c -ljson-c
|
||||||
|
|||||||
Reference in New Issue
Block a user