Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not hardcode m64 v2 #478

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions build/gmake.darwin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ help:
@echo "CONFIGURATIONS:"
@echo " release"
@echo " debug"
@echo " releaseuniv32"
@echo " debuguniv32"
@echo ""
@echo "TARGETS:"
@echo " all (default)"
Expand Down
196 changes: 10 additions & 186 deletions build/gmake.darwin/genie.make
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ ifeq ($(config),release)
DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX
INCLUDES += -I"../../src/host/lua-5.3.0/src"
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -m64 -mmacosx-version-min=10.6
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -m64 -mmacosx-version-min=10.6
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -m64 -mmacosx-version-min=10.6
ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -m64 -mmacosx-version-min=10.6
ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -m64 -mmacosx-version-min=10.6
ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -mmacosx-version-min=10.6
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -mmacosx-version-min=10.6
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -mmacosx-version-min=10.6
ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -mmacosx-version-min=10.6
ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -mmacosx-version-min=10.6
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
ALL_LDFLAGS += $(LDFLAGS) -L"." -mmacosx-version-min=10.6
LIBDEPS +=
Expand Down Expand Up @@ -136,11 +136,11 @@ ifeq ($(config),debug)
DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX
INCLUDES += -I"../../src/host/lua-5.3.0/src"
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -m64 -mmacosx-version-min=10.6
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -m64 -mmacosx-version-min=10.6
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -m64 -mmacosx-version-min=10.6
ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -m64 -mmacosx-version-min=10.6
ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -m64 -mmacosx-version-min=10.6
ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g $(MPARAM) -mmacosx-version-min=10.6
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g $(MPARAM) -mmacosx-version-min=10.6
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g $(MPARAM) -mmacosx-version-min=10.6
ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g $(MPARAM) -mmacosx-version-min=10.6
ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g $(MPARAM) -mmacosx-version-min=10.6
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
ALL_LDFLAGS += $(LDFLAGS) -L"." -mmacosx-version-min=10.6
LIBDEPS +=
Expand Down Expand Up @@ -216,182 +216,6 @@ ifeq ($(config),debug)
endef
endif

ifeq ($(config),releaseuniv32)
AR = libtool
OBJDIR = obj/Universal32/Release
TARGETDIR = ../../bin/darwin
override TARGET = $(TARGETDIR)/genie
DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX
INCLUDES += -I"../../src/host/lua-5.3.0/src"
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -arch i386 -arch ppc -m64 -mmacosx-version-min=10.6
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -arch i386 -arch ppc -m64 -mmacosx-version-min=10.6
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -arch i386 -arch ppc -m64 -mmacosx-version-min=10.6
ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -arch i386 -arch ppc -m64 -mmacosx-version-min=10.6
ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -arch i386 -arch ppc -m64 -mmacosx-version-min=10.6
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
ALL_LDFLAGS += $(LDFLAGS) -L"." -arch i386 -arch ppc -mmacosx-version-min=10.6
LIBDEPS +=
LDDEPS +=
LDRESP =
LIBS += $(LDDEPS) -framework CoreServices
EXTERNAL_LIBS +=
LINKOBJS = $(OBJECTS)
LINKCMD = $(CC) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
OBJRESP =
OBJECTS := \
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
$(OBJDIR)/src/host/os_chdir.o \
$(OBJDIR)/src/host/os_copyfile.o \
$(OBJDIR)/src/host/os_getcwd.o \
$(OBJDIR)/src/host/os_is64bit.o \
$(OBJDIR)/src/host/os_isdir.o \
$(OBJDIR)/src/host/os_isfile.o \
$(OBJDIR)/src/host/os_match.o \
$(OBJDIR)/src/host/os_mkdir.o \
$(OBJDIR)/src/host/os_pathsearch.o \
$(OBJDIR)/src/host/os_rmdir.o \
$(OBJDIR)/src/host/os_stat.o \
$(OBJDIR)/src/host/os_ticks.o \
$(OBJDIR)/src/host/os_uuid.o \
$(OBJDIR)/src/host/path_getabsolute.o \
$(OBJDIR)/src/host/path_getrelative.o \
$(OBJDIR)/src/host/path_helpers.o \
$(OBJDIR)/src/host/path_isabsolute.o \
$(OBJDIR)/src/host/premake.o \
$(OBJDIR)/src/host/premake_main.o \
$(OBJDIR)/src/host/scripts.o \
$(OBJDIR)/src/host/string_endswith.o \
$(OBJDIR)/src/host/string_hash.o \

define PREBUILDCMDS
endef
define PRELINKCMDS
endef
define POSTBUILDCMDS
endef
endif

ifeq ($(config),debuguniv32)
AR = libtool
OBJDIR = obj/Universal32/Debug
TARGETDIR = ../../bin/darwin
override TARGET = $(TARGETDIR)/genie
DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX
INCLUDES += -I"../../src/host/lua-5.3.0/src"
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -arch i386 -arch ppc -m64 -mmacosx-version-min=10.6
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -arch i386 -arch ppc -m64 -mmacosx-version-min=10.6
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -arch i386 -arch ppc -m64 -mmacosx-version-min=10.6
ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -arch i386 -arch ppc -m64 -mmacosx-version-min=10.6
ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -arch i386 -arch ppc -m64 -mmacosx-version-min=10.6
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
ALL_LDFLAGS += $(LDFLAGS) -L"." -arch i386 -arch ppc -mmacosx-version-min=10.6
LIBDEPS +=
LDDEPS +=
LDRESP =
LIBS += $(LDDEPS) -framework CoreServices
EXTERNAL_LIBS +=
LINKOBJS = $(OBJECTS)
LINKCMD = $(CC) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
OBJRESP =
OBJECTS := \
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
$(OBJDIR)/src/host/os_chdir.o \
$(OBJDIR)/src/host/os_copyfile.o \
$(OBJDIR)/src/host/os_getcwd.o \
$(OBJDIR)/src/host/os_is64bit.o \
$(OBJDIR)/src/host/os_isdir.o \
$(OBJDIR)/src/host/os_isfile.o \
$(OBJDIR)/src/host/os_match.o \
$(OBJDIR)/src/host/os_mkdir.o \
$(OBJDIR)/src/host/os_pathsearch.o \
$(OBJDIR)/src/host/os_rmdir.o \
$(OBJDIR)/src/host/os_stat.o \
$(OBJDIR)/src/host/os_ticks.o \
$(OBJDIR)/src/host/os_uuid.o \
$(OBJDIR)/src/host/path_getabsolute.o \
$(OBJDIR)/src/host/path_getrelative.o \
$(OBJDIR)/src/host/path_helpers.o \
$(OBJDIR)/src/host/path_isabsolute.o \
$(OBJDIR)/src/host/premake.o \
$(OBJDIR)/src/host/premake_main.o \
$(OBJDIR)/src/host/scripts.o \
$(OBJDIR)/src/host/string_endswith.o \
$(OBJDIR)/src/host/string_hash.o \

define PREBUILDCMDS
endef
define PRELINKCMDS
endef
define POSTBUILDCMDS
endef
endif

OBJDIRS := \
$(OBJDIR) \
$(OBJDIR)/src/host \
Expand Down
20 changes: 10 additions & 10 deletions build/gmake.linux/genie.make
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ ifeq ($(config),release)
DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
INCLUDES += -I"../../src/host/lua-5.3.0/src"
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -m64 -Wno-implicit-fallthrough
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -m64 -Wno-implicit-fallthrough
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -m64 -Wno-implicit-fallthrough
ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -m64 -Wno-implicit-fallthrough
ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -m64 -Wno-implicit-fallthrough
ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough
ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough
ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM) -Wno-implicit-fallthrough
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
ALL_LDFLAGS += $(LDFLAGS) -L"." -s -rdynamic
LIBDEPS +=
Expand Down Expand Up @@ -136,11 +136,11 @@ ifeq ($(config),debug)
DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
INCLUDES += -I"../../src/host/lua-5.3.0/src"
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -m64 -Wno-implicit-fallthrough
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -m64 -Wno-implicit-fallthrough
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -m64 -Wno-implicit-fallthrough
ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -m64 -Wno-implicit-fallthrough
ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -m64 -Wno-implicit-fallthrough
ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g $(MPARAM) -Wno-implicit-fallthrough
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g $(MPARAM) -Wno-implicit-fallthrough
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g $(MPARAM) -Wno-implicit-fallthrough
ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g $(MPARAM) -Wno-implicit-fallthrough
ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g $(MPARAM) -Wno-implicit-fallthrough
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
ALL_LDFLAGS += $(LDFLAGS) -L"." -rdynamic
LIBDEPS +=
Expand Down
20 changes: 10 additions & 10 deletions build/gmake.windows/genie.make
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ ifeq ($(config),release)
DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE
INCLUDES += -I"../../src/host/lua-5.3.0/src"
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -m64
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -m64
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -m64
ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -m64
ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -m64
ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM)
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM)
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM)
ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM)
ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os $(MPARAM)
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
ALL_LDFLAGS += $(LDFLAGS) -L"." -s
LIBDEPS +=
Expand Down Expand Up @@ -136,11 +136,11 @@ ifeq ($(config),debug)
DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE
INCLUDES += -I"../../src/host/lua-5.3.0/src"
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -m64
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -m64
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -m64
ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -m64
ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -m64
ALL_ASMFLAGS += $(ASMFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g $(MPARAM)
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g $(MPARAM)
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g $(MPARAM)
ALL_OBJCFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g $(MPARAM)
ALL_OBJCPPFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g $(MPARAM)
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
ALL_LDFLAGS += $(LDFLAGS) -L"."
LIBDEPS +=
Expand Down
16 changes: 16 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ else
OS=windows
endif

UNAME_M := $(shell uname -m)
ifeq ($(UNAME_M),$(filter i%86,$(UNAME_M)))
MPARAM=-m32
else
ifeq ($(UNAME_M),$(filter aarch64,$(UNAME_M)))
MPARAM=
else
ifeq ($(UNAME_M),$(filter armv%,$(UNAME_M)))
MPARAM=
else
MPARAM=-m64
endif
endif
endif
export MPARAM

.PHONY: release

GENIE=bin/$(OS)/genie
Expand Down
2 changes: 1 addition & 1 deletion scripts/genie.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}

buildoptions {
"-m64",
"$(MPARAM)",
}

configuration "Debug"
Expand Down