X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=int%2FMakefile;h=23ecaf706dc4750f0562ec67846b9ced1abd73ca;hb=ddfd196fa4999b117701121a2f4cb1fe378f902d;hp=fb845f0a1a1a150a6c5d90665d8e3ddeae0c35c8;hpb=7edf1780ae3b91d9136db2d94b25e88d64896645;p=mTask.git diff --git a/int/Makefile b/int/Makefile old mode 100644 new mode 100755 index fb845f0..23ecaf7 --- a/int/Makefile +++ b/int/Makefile @@ -1,15 +1,34 @@ -CFLAGS:=-g -Wall -Wextra -Werror -std=c99 -PROG:=main -OBJS:=interpret.o sds.o task.o - -all: mTaskSymbols.h $(PROG) - -$(PROG): $(PROG).c $(OBJS) misc.h - $(LINK.c) $(LDLIBS) $^ $(OUTPUT_OPTION) - -mTaskSymbols.h: - CLMFLAGS=-nr make -BC .. mTaskInterpret - ../mTaskInterpret > $@ - -clean: - $(RM) $(OBJS) $(PROG) +export +SHOWPJ = 1 +AUTOJ = 1 +MAKES = $(wildcard */Makefile) +DIRS = $(patsubst %/Makefile,%,$(MAKES)) +CLNS = $(patsubst %,%/cln,$(DIRS)) +BINS = $(foreach a,$(DIRS),$(a)/$(a).bin) + +all: $(BINS) +# -test -d com/tools && make -C com/tools all +# @echo made $(BINS) + +hb: $(filter homebus-%,$(BINS)) + +tools: + -test -d com/tools && make -C com/tools all + +info: + $(info $(BINS)) + $(info $(CLNS)) + $(info $(dir $(BINS))) + +$(BINS): + @${MAKE} -C $(dir $@) + +clean: $(CLNS) + -test -d com/tools && make -C com/tools clean +# -test -d com/homebus-bpi && make -C homebus-bpi clean + find . -name *.d -o -name *.o -o -name *.a -o -name *.bin -o -name *.out -o -name *.list -o -name *.map -o -name *.hex -o -name *.s19 -o -name *.sl |xargs rm -fv + -rm -rfv */o/* */filelist + +$(CLNS): + @${MAKE} -C $(dir $@) clean + @touch $@