makefile: added param to override ar

This commit is contained in:
hap 2021-03-30 13:57:51 +02:00
parent 4d3afe00fc
commit 2247ffefa2
5 changed files with 33 additions and 25 deletions

View file

@ -90,6 +90,7 @@
# OVERRIDE_CC = cc
# OVERRIDE_CXX = c++
# OVERRIDE_LD = ld
# OVERRIDE_AR = ar
# DEPRECATED = 0
# LTO = 1
@ -108,7 +109,7 @@
# FORCE_VERSION_COMPILE = 1
# MSBUILD = 1
# IGNORE_BAD_LOCALISATION=1
# IGNORE_BAD_LOCALISATION = 1
# PRECOMPILE = 0
# DEBUG_DIR=c:\test\location
@ -238,6 +239,7 @@ endif
# build scripts will be run from
# scripts/target/$(TARGET)/$(SUBTARGET).lua
#-------------------------------------------------
ifdef PROJECT
PARAMS += --PROJECT='$(PROJECT)'
TARGET := $(PROJECT)
@ -591,6 +593,12 @@ ifndef CROSS_BUILD
LD := $(OVERRIDE_LD)
endif
endif
ifdef OVERRIDE_AR
PARAMS += --AR='$(OVERRIDE_AR)'
ifndef CROSS_BUILD
AR := $(OVERRIDE_AR)
endif
endif
#-------------------------------------------------
# sanity check the configuration
@ -893,11 +901,11 @@ endif
ifdef SANITIZE
PARAMS += --SANITIZE='$(SANITIZE)'
endif
#-------------------------------------------------
# All scripts
#-------------------------------------------------
SCRIPTS = scripts/genie.lua \
scripts/src/lib.lua \
scripts/src/emu.lua \
@ -1466,6 +1474,7 @@ xcode4-ios: generate
#-------------------------------------------------
# gmake-solaris
#-------------------------------------------------
ifndef CLANG_VERSION
$(PROJECTDIR)/$(MAKETYPE)-solaris/Makefile: makefile $(SCRIPTS) $(GENIE)
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=solaris --gcc_version=$(GCC_VERSION) $(MAKETYPE)
@ -1486,6 +1495,7 @@ solaris_x86: generate $(PROJECTDIR)/$(MAKETYPE)-solaris/Makefile
#-------------------------------------------------
# gmake-solaris-clang
#-------------------------------------------------
ifdef CLANG_VERSION
$(PROJECTDIR)/$(MAKETYPE)-solaris/Makefile: makefile $(SCRIPTS) $(GENIE)
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=solaris --gcc_version=$(CLANG_VERSION) $(MAKETYPE)
@ -1503,7 +1513,6 @@ solaris_x86_clang: generate $(PROJECTDIR)/$(MAKETYPE)-solaris/Makefile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-solaris config=$(CONFIG)32 precompile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-solaris config=$(CONFIG)32
#-------------------------------------------------
# gmake-freebsd
#-------------------------------------------------
@ -1673,6 +1682,7 @@ endif
#-------------------------------------------------
# cmake
#-------------------------------------------------
.PHONY: cmake
cmake: generate
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) cmake
@ -1771,6 +1781,7 @@ ifdef IGNORE_BAD_LOCALISATION
else
$(SILENT)$(PYTHON) scripts/build/msgfmt.py --output-file $@ $<
endif
#-------------------------------------------------
# Regression tests
#-------------------------------------------------

View file

@ -202,6 +202,11 @@ newoption {
description = "LD replacement",
}
newoption {
trigger = "AR",
description = "AR replacement",
}
newoption {
trigger = "TOOLCHAIN",
description = "Toolchain prefix"

View file

@ -488,6 +488,9 @@ function toolchain(_buildDir, _subDir)
if (_OPTIONS["LD"] ~= nil) then
premake.gcc.ld = _OPTIONS["LD"]
end
if (_OPTIONS["AR"] ~= nil) then
premake.gcc.ar = _OPTIONS["AR"]
end
configuration {} -- reset configuration

View file

@ -17,6 +17,7 @@ Scorpio 68000 hardware is very similar, but with chessboard buttons and side led
******************************************************************************/
#include "emu.h"
#include "bus/rs232/rs232.h"
#include "cpu/m68000/m68000.h"
#include "machine/sensorboard.h"
@ -94,22 +95,15 @@ private:
HD44780_PIXEL_UPDATE(lcd_pixel_update);
void lcd_palette(palette_device &palette) const;
u8 m_inp_mux;
u8 m_led_data;
u8 m_led_side;
u8 m_lcd_control;
u8 m_lcd_data;
u8 m_inp_mux = 0;
u8 m_led_data = 0;
u8 m_led_side = 0;
u8 m_lcd_control = 0;
u8 m_lcd_data = 0;
};
void diablo_state::machine_start()
{
// zerofill
m_inp_mux = 0;
m_led_data = 0;
m_led_side = 0;
m_lcd_control = 0;
m_lcd_data = 0;
// register for savestates
save_item(NAME(m_inp_mux));
save_item(NAME(m_led_data));

View file

@ -37,6 +37,7 @@ TODO:
******************************************************************************/
#include "emu.h"
#include "bus/rs232/rs232.h"
#include "cpu/m6502/m65c02.h"
#include "machine/sensorboard.h"
@ -124,20 +125,14 @@ protected:
HD44780_PIXEL_UPDATE(lcd_pixel_update);
void lcd_palette(palette_device &palette) const;
u8 m_inp_mux;
u8 m_led_data;
u8 m_lcd_control;
u8 m_lcd_data;
u8 m_inp_mux = 0;
u8 m_led_data = 0;
u8 m_lcd_control = 0;
u8 m_lcd_data = 0;
};
void sexpert_state::machine_start()
{
// zerofill
m_inp_mux = 0;
m_led_data = 0;
m_lcd_control = 0;
m_lcd_data = 0;
// register for savestates
save_item(NAME(m_inp_mux));
save_item(NAME(m_led_data));