build: httpd: also declutter sourcecode

This commit is contained in:
René van Dorst
2025-09-27 12:52:24 +02:00
parent 60b854550d
commit 0ac4792dde
2 changed files with 13 additions and 8 deletions
+1 -1
View File
@@ -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
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
tools/fileadder -a $(HTML_LOCATION) -s $(IMAGESIZE) -b BANK1 -d html -p html_data
+12 -7
View File
@@ -3,21 +3,26 @@ CC_FLAGS = -mmcs51 -I. -I../uip
ASM = sdas8051
AFLAGS= -plosgff
BUILDDIR = output/
SRCS = httpd.c page_impl.c
OBJS = ${SRCS:.c=.rel}
OBJS = ${SRCS:%.c=$(BUILDDIR)%.rel}
all: $(OBJS)
all: create_build_dir $(OBJS)
%.asm: %.c
$(CC) $(CC_FLAGS) -c -S $<
create_build_dir:
mkdir -p $(BUILDDIR)
%.rel: %.asm
$(BUILDDIR)%.asm: %.c
$(CC) $(CC_FLAGS) -o $@ -c -S $<
$(BUILDDIR)%.rel: $(BUILDDIR)%.asm
./treatasm.py $^ >$^.new
mv $^.new $^
${ASM} ${AFLAGS} $^
${ASM} ${AFLAGS} -o $@ $^
clean:
rm .asm *.lst *.rel *.rst *.sym
rm -r $(BUILDDIR)
.PHONY: all clean