From e271a0fb40690cef971e0152370aa39f1519ab83 Mon Sep 17 00:00:00 2001 From: Daniel Serpell Date: Mon, 28 Feb 2022 23:41:32 -0300 Subject: [PATCH] Remove fb-int compatibility binary. With all the new targets, having an "integer only" version does not make sense anymore, so stop creating the binary. --- Makefile | 4 ++-- rules.mak | 10 +++++----- src/compiler/main.cc | 15 +-------------- 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 8cef1be..de0f54c 100644 --- a/Makefile +++ b/Makefile @@ -336,8 +336,6 @@ COMPILER_COMMON=\ build/compiler/fastbasic.cfg\ build/compiler/fastbasic-a5200.cfg\ build/compiler/fastbasic-cart.cfg\ - build/compiler/fb$(EXT)\ - build/compiler/fb-int$(EXT)\ build/compiler/USAGE.md\ build/compiler/LICENSE\ build/compiler/MANUAL.md\ @@ -581,6 +579,7 @@ COMPILER_HOST=\ $(LD65_HOST)\ $(AR65_HOST)\ $(FASTBASIC_HOST)\ + build/bin/fb$(EXT)\ # Target compiler COMPILER_TARGET=\ @@ -588,6 +587,7 @@ COMPILER_TARGET=\ $(LD65_TARGET)\ $(AR65_TARGET)\ $(FASTBASIC_TARGET)\ + build/compiler/fb$(EXT)\ # All ASM Output files OBJS=$(RT_OBJS_FP) \ diff --git a/rules.mak b/rules.mak index 744c56d..0715eaf 100644 --- a/rules.mak +++ b/rules.mak @@ -127,6 +127,10 @@ $(LD65_TARGET): $(LD65_SRC) | build/compiler $(AR65_TARGET): $(AR65_SRC) | build/compiler $(ECHO) "Compile target AR65" $(Q)$(CROSS)$(CC) $(TARGET_CFLAGS) $(CC65_CFLAGS) -o $@ $^ + +# Copy compatibility binaries +build/compiler/fb$(EXT): build/compiler/fastbasic$(EXT) + $(Q)cp -f $< $@ endif # Generator for syntax file - 6502 version - FLOAT @@ -254,11 +258,7 @@ build/compiler/%: compiler/% | build/compiler $(Q)cp -f $< $@ # Copy compatibility binaries -build/compiler/fb$(EXT): build/compiler/fastbasic$(EXT) - $(Q)cp -f $< $@ - -# Copy compatibility binaries -build/compiler/fb-int$(EXT): build/compiler/fastbasic$(EXT) +build/bin/fb$(EXT): build/bin/fastbasic$(EXT) $(Q)cp -f $< $@ # Copy syntax files to compiler folder diff --git a/src/compiler/main.cc b/src/compiler/main.cc index ffed5ff..be2b56a 100644 --- a/src/compiler/main.cc +++ b/src/compiler/main.cc @@ -62,19 +62,6 @@ static int show_error(std::string msg) return 1; } -// Selects a default target based on compiler name -static std::string default_target(const std::string &prog) -{ - // Get program filename - auto base = os::file_name(prog); - - // Check if contains the word "-int": - if(base.rfind("-int") != base.npos) - return "atari-int"; - else - return "default"; -} - int main(int argc, char **argv) { auto program_name = std::string(argv[0]); @@ -86,7 +73,7 @@ int main(int argc, char **argv) std::string out_name; std::string exe_name; bool got_outname = false, one_step = false, next_is_output = false; - std::string target_name = default_target(program_name); + std::string target_name = "default"; std::string cfg_file_def; compiler comp; std::vector link_opts;