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:
+12
-7
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user