aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2024-05-27 17:09:25 +0100
committerJuan J. Martinez <jjm@usebox.net>2024-05-27 17:09:25 +0100
commitbc9281a3bb7a85c826d3a49220bc13134478477c (patch)
tree4e10698fe533dd54db85bb38087ae9158b1a531d /tools
parent4b56dc74819f7fc85099ffa49e772ce821592708 (diff)
downloadubox-msx-lib-bc9281a3bb7a85c826d3a49220bc13134478477c.tar.gz
ubox-msx-lib-bc9281a3bb7a85c826d3a49220bc13134478477c.zip
Properly create bin directory
bin subdirectory is not properly created before running make -C tools. Co-authored-by: Pedro de Medeiros <pedro.medeiros@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile9
-rw-r--r--tools/apultra/Makefile8
-rwxr-xr-xtools/hex2bin-2.0/Makefile2
-rw-r--r--tools/rasm/Makefile2
4 files changed, 13 insertions, 8 deletions
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: