mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
build: httpd: also declutter sourcecode
This commit is contained in:
@@ -21,7 +21,7 @@ create_build_dir:
|
|||||||
|
|
||||||
SRCS = rtlplayground.c rtl837x_flash.c rtl837x_phy.c rtl837x_port.c cmd_parser.c html_data.c rtl837x_igmp.c rtl837x_stp.c
|
SRCS = rtlplayground.c rtl837x_flash.c rtl837x_phy.c rtl837x_port.c cmd_parser.c html_data.c rtl837x_igmp.c rtl837x_stp.c
|
||||||
OBJS = ${SRCS:%.c=$(BUILDDIR)%.rel}
|
OBJS = ${SRCS:%.c=$(BUILDDIR)%.rel}
|
||||||
OBJS += uip/timer.rel uip/uip-fw.rel uip/uip-neighbor.rel uip/uip-split.rel uip/uip.rel uip/uip_arp.rel uip/uiplib.rel httpd/httpd.rel httpd/page_impl.rel
|
OBJS += uip/timer.rel uip/uip-fw.rel uip/uip-neighbor.rel uip/uip-split.rel uip/uip.rel uip/uip_arp.rel uip/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/fileadder -a $(HTML_LOCATION) -s $(IMAGESIZE) -b BANK1 -d html -p html_data
|
||||||
|
|||||||
+12
-7
@@ -3,21 +3,26 @@ CC_FLAGS = -mmcs51 -I. -I../uip
|
|||||||
ASM = sdas8051
|
ASM = sdas8051
|
||||||
AFLAGS= -plosgff
|
AFLAGS= -plosgff
|
||||||
|
|
||||||
|
BUILDDIR = output/
|
||||||
|
|
||||||
SRCS = httpd.c page_impl.c
|
SRCS = httpd.c page_impl.c
|
||||||
OBJS = ${SRCS:.c=.rel}
|
OBJS = ${SRCS:%.c=$(BUILDDIR)%.rel}
|
||||||
|
|
||||||
all: $(OBJS)
|
all: create_build_dir $(OBJS)
|
||||||
|
|
||||||
%.asm: %.c
|
create_build_dir:
|
||||||
$(CC) $(CC_FLAGS) -c -S $<
|
mkdir -p $(BUILDDIR)
|
||||||
|
|
||||||
%.rel: %.asm
|
$(BUILDDIR)%.asm: %.c
|
||||||
|
$(CC) $(CC_FLAGS) -o $@ -c -S $<
|
||||||
|
|
||||||
|
$(BUILDDIR)%.rel: $(BUILDDIR)%.asm
|
||||||
./treatasm.py $^ >$^.new
|
./treatasm.py $^ >$^.new
|
||||||
mv $^.new $^
|
mv $^.new $^
|
||||||
${ASM} ${AFLAGS} $^
|
${ASM} ${AFLAGS} -o $@ $^
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm .asm *.lst *.rel *.rst *.sym
|
rm -r $(BUILDDIR)
|
||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user