From bc9281a3bb7a85c826d3a49220bc13134478477c Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Mon, 27 May 2024 17:09:25 +0100 Subject: Properly create bin directory bin subdirectory is not properly created before running make -C tools. Co-authored-by: Pedro de Medeiros --- tools/Makefile | 9 ++++++--- tools/apultra/Makefile | 8 +++++--- tools/hex2bin-2.0/Makefile | 2 +- tools/rasm/Makefile | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) (limited to 'tools') diff --git a/tools/Makefile b/tools/Makefile index 328b5a1..5c8bbdb 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -2,17 +2,20 @@ BIN := ../bin/hex2bin ../bin/rasm ../bin/apultra all: $(BIN) -../bin/hex2bin: +../bin/hex2bin: ../bin mkdir -p hex2bin-2.0/bin make -C hex2bin-2.0 make -C hex2bin-2.0 cleanall -../bin/rasm: +../bin/rasm: ../bin make -C rasm -../bin/apultra: +../bin/apultra: ../bin make -C apultra +../bin: + mkdir -p ../bin + .PHONY: all clean clean: make -C hex2bin-2.0 cleanall diff --git a/tools/apultra/Makefile b/tools/apultra/Makefile index 1b246aa..f657152 100644 --- a/tools/apultra/Makefile +++ b/tools/apultra/Makefile @@ -19,7 +19,7 @@ OBJS += $(OBJDIR)/src/libdivsufsort/lib/divsufsort_utils.o OBJS += $(OBJDIR)/src/libdivsufsort/lib/sssort.o OBJS += $(OBJDIR)/src/libdivsufsort/lib/trsort.o -all: $(APP) +all: default ifeq ($(OS),Windows_NT) TARGET = apultra.exe @@ -27,10 +27,12 @@ else TARGET = apultra endif +default: $(APP) + cp $(APP) -t ../../bin + @rm -rf $(TARGET) $(OBJDIR) + $(APP): $(OBJS) $(CC) $^ $(LDFLAGS) -o $(APP) - cp $(TARGET) ../../bin - @rm -rf $(TARGET) $(OBJDIR) clean: @rm -rf $(TARGET) $(OBJDIR) diff --git a/tools/hex2bin-2.0/Makefile b/tools/hex2bin-2.0/Makefile index 6c87000..d361146 100755 --- a/tools/hex2bin-2.0/Makefile +++ b/tools/hex2bin-2.0/Makefile @@ -35,7 +35,7 @@ $(TGTDIR)/hex2bin.1: $(SRCDIR)/hex2bin.pod $(TGTDIR)/hex2bin: $(B_OBJFILES) gcc $(CPFLAGS) -o $(TGTDIR)/hex2bin $(B_OBJFILES) - cp bin/$(TARGET) ../../bin + cp bin/$(TARGET) -t ../../bin $(TGTDIR)/mot2bin: $(M_OBJFILES) gcc $(CPFLAGS) -o $(TGTDIR)/mot2bin $(M_OBJFILES) diff --git a/tools/rasm/Makefile b/tools/rasm/Makefile index 25d6b31..da9de8c 100644 --- a/tools/rasm/Makefile +++ b/tools/rasm/Makefile @@ -48,7 +48,7 @@ ZX0_OBJ+=$(SRC_ZX0DIR)/memory.o .PHONY: prod third debug clean default: prod - cp $(EXEC) ../../bin + cp $(EXEC) -t ../../bin rm -f $(EXEC) *.o third: -- cgit v1.2.3