From 196bd4d6aae43229935603ad28ffecedb98e0afd Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Sun, 1 May 2005 11:24:07 +0000 Subject: [PATCH] Added HOST=mingw32-linux64 setting. Fixed various small breakage for linux64 host. svn path=/trunk/; revision=14910 --- .../include/freebsd/src/sys/sys/systm.h | 2 +- reactos/drivers/lib/oskittcp/makefile | 5 ++-- reactos/lib/shell32/Makefile.ros-template | 2 +- reactos/rules.mak | 26 +++++++++++++++++-- reactos/tools/Makefile | 10 +++---- reactos/tools/bin2res/Makefile | 5 ++-- reactos/tools/buildno/Makefile | 5 ++-- reactos/tools/cabman/cabinet.cxx | 2 +- reactos/tools/cabman/makefile | 5 ++-- reactos/tools/cdmake/Makefile | 5 ++-- reactos/tools/helper.mk | 16 +++++++++--- reactos/tools/mkhive/Makefile | 5 ++++ reactos/tools/rgenstat/Makefile | 5 ++-- reactos/tools/tools-check.mak | 5 ++-- reactos/tools/widl/Makefile | 9 +++---- reactos/tools/wine2ros/Makefile | 5 ++-- reactos/tools/winebuild/Makefile | 10 ++++--- reactos/tools/winebuild/import.c | 2 ++ reactos/tools/wmc/makefile | 5 ++-- reactos/tools/wpp/Makefile | 2 +- reactos/tools/wrc/Makefile | 9 +++---- 21 files changed, 85 insertions(+), 55 deletions(-) diff --git a/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/systm.h b/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/systm.h index a4216674c13..d5f3d0f6442 100644 --- a/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/systm.h +++ b/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/systm.h @@ -129,7 +129,7 @@ void printf __P((const char *, ...)); int __cdecl vprintf(const char *, va_list); #define log bsd_log -static inline int bsd_log ( int blah, const char* fmt, ... ) +static int bsd_log ( int blah, const char* fmt, ... ) { va_list arg; int i; diff --git a/reactos/drivers/lib/oskittcp/makefile b/reactos/drivers/lib/oskittcp/makefile index 52e791c66bb..6ec60412082 100644 --- a/reactos/drivers/lib/oskittcp/makefile +++ b/reactos/drivers/lib/oskittcp/makefile @@ -11,11 +11,8 @@ TARGET_TYPE = library TARGET_NAME = oskittcp #-DMEMTRACK -TARGET_CFLAGS = -g -D__REACTOS__=1 -D__NTDRIVER__ -DKERNEL -Iinclude/freebsd -Iinclude/freebsd/sys/include -Iinclude/freebsd/src/sys -Iinclude/freebsd/dev/include -Iinclude/freebsd/net/include -Iinclude -I$(PATH_TO_TOP)/w32api/include -I$(PATH_TO_TOP)/include # require os code to explicitly request A/W version of structs/functions -TARGET_CFLAGS += -D_DISABLE_TIDENTS - TARGET_ASFLAGS = -I $(PATH_TO_TOP)/include TARGET_LFLAGS = -Wl,--file-alignment,0x1000 \ @@ -71,6 +68,8 @@ include $(TOOLS_PATH)/helper.mk include $(TOOLS_PATH)/depend.mk +TARGET_CFLAGS += -D__REACTOS__=1 -D__NTDRIVER__ -DKERNEL -Iinclude/freebsd -Iinclude/freebsd/sys/include -Iinclude/freebsd/src/sys -Iinclude/freebsd/dev/include -Iinclude/freebsd/net/include -Iinclude + %/TAGS: etags -o $(@D)/TAGS $(@D)/\*.c diff --git a/reactos/lib/shell32/Makefile.ros-template b/reactos/lib/shell32/Makefile.ros-template index 1268c4a1dde..dacc69e69a1 100644 --- a/reactos/lib/shell32/Makefile.ros-template +++ b/reactos/lib/shell32/Makefile.ros-template @@ -19,7 +19,7 @@ TARGET_CLEAN = authors.c default: all authors.c: -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) echo 'const char * const SHELL_Authors[] = { "Copyright 1993-2005 WINE team", "Copyright 1998-2005 ReactOS team", 0 };' > authors.c else echo const char * const SHELL_Authors[] = { "Copyright 1993-2005 WINE team", "Copyright 1998-2005 ReactOS team", 0 }; > authors.c diff --git a/reactos/rules.mak b/reactos/rules.mak index f6ffdf522dc..f5a1af417b0 100644 --- a/reactos/rules.mak +++ b/reactos/rules.mak @@ -72,7 +72,27 @@ endif # # Choose various options # +ifeq ($(HOST),mingw32-linux64) +export HOST_TYPE = unix +export NASM_FORMAT = win32 +export PREFIX = mingw32- +export EXE_POSTFIX := +export EXE_PREFIX := ./ +export DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as +# +# Do not change NASM_CMD to NASM because older versions of +# nasm doesn't like an environment variable NASM +# +export NASM_CMD = nasm +export DOSCLI = +export FLOPPY_DIR = /mnt/floppy +export SEP := / +export PIPE := +export HOST_ARCH := -m32 +endif + ifeq ($(HOST),mingw32-linux) +export HOST_TYPE = unix export NASM_FORMAT = win32 export PREFIX = mingw32- export EXE_POSTFIX := @@ -132,8 +152,8 @@ endif export CC = $(Q)$(PREFIX)gcc export CXX = $(Q)$(PREFIX)g++ -export HOST_CC = $(Q)gcc -export HOST_CXX = $(Q)g++ +export HOST_CC = $(Q)gcc $(HOST_ARCH) +export HOST_CXX = $(Q)g++ $(HOST_ARCH) export HOST_AR = $(Q)ar export HOST_NM = $(Q)nm export LD = $(Q)$(PREFIX)ld @@ -169,7 +189,9 @@ export MS2PS = $(Q)$(TOOLS_PATH)/ms2ps/ms2ps export WRC = $(Q)$(TOOLS_PATH)/wrc/wrc export WIDL = $(Q)$(TOOLS_PATH)/widl/widl +export HOST_STD_CFLAGS = -I$(PATH_TO_TOP)/include -I$(W32API_PATH)/include -pipe -D_M_IX86 $(HOSTARCH) export STD_CFLAGS = -I$(PATH_TO_TOP)/include -I$(W32API_PATH)/include -pipe -march=$(OARCH) -D_M_IX86 +export HOST_STD_CPPFLAGS = $(HOST_STD_CFLAGS) export STD_CPPFLAGS = $(STD_CFLAGS) # Check for 3GB ifeq ($(3GB), 1) diff --git a/reactos/tools/Makefile b/reactos/tools/Makefile index da89ae71c83..cf71bc8a366 100644 --- a/reactos/tools/Makefile +++ b/reactos/tools/Makefile @@ -3,11 +3,10 @@ PATH_TO_TOP = .. include $(PATH_TO_TOP)/rules.mak CFLAGS += -Wall -Werror -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) CFLAGS += -DUNIX_PATHS rm := @rm -endif -ifeq ($(HOST),mingw32-windows) +else CFLAGS += -DDOS_PATHS rm := -@del endif @@ -152,11 +151,10 @@ clean: $(MAKE) --silent -C ../lib/zlib -f Makefile.host clean $(MAKE) -C wpp clean $(MAKE) -C unicode clean -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) @rm mkconfig @rm $(TOOLS) -endif -ifeq ($(HOST),mingw32-windows) +else $(MAKE) --silent -C pipetools clean $(rm) *$(EXE_POSTFIX) endif diff --git a/reactos/tools/bin2res/Makefile b/reactos/tools/bin2res/Makefile index 3e110c0e5f5..4ff8c86eb83 100644 --- a/reactos/tools/bin2res/Makefile +++ b/reactos/tools/bin2res/Makefile @@ -19,11 +19,10 @@ mkstemps.o: mkstemps.c bin2res$(EXE_POSTFIX): $(OBJECTS) $(HOST_CC) -g $(OBJECTS) -o $(TARGET) -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: rm -f *.o $(TARGET) -endif -ifneq ($(HOST),mingw32-linux) +else clean: del *.o $(TARGET) endif diff --git a/reactos/tools/buildno/Makefile b/reactos/tools/buildno/Makefile index a5e3cd7493e..f16dc7780b0 100644 --- a/reactos/tools/buildno/Makefile +++ b/reactos/tools/buildno/Makefile @@ -26,12 +26,11 @@ buildno$(EXE_POSTFIX): $(OBJECTS) $(HOST_CXX) -g $(OBJECTS) -o $(TARGET) @$(EXE_PREFIX)buildno$(EXE_POSTFIX) -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: -rm -f *.o $(TARGET) -rm $(PATH_TO_TOP)/include/reactos/buildno.h -endif -ifneq ($(HOST),mingw32-linux) +else clean: -del *.o $(TARGET) -del ..\..\include\reactos\buildno.h diff --git a/reactos/tools/cabman/cabinet.cxx b/reactos/tools/cabman/cabinet.cxx index ef350631327..c55a761d40b 100755 --- a/reactos/tools/cabman/cabinet.cxx +++ b/reactos/tools/cabman/cabinet.cxx @@ -2473,7 +2473,7 @@ unsigned long CCabinet::ComputeChecksum(void* Buffer, /* FIXME: Doesn't seem to be correct. EXTRACT.EXE won't accept checksums computed by this routine */ - DPRINT(MIN_TRACE, ("Checksumming buffer (0x%X) Size (%d)\n", (unsigned int)Buffer, Size)); + DPRINT(MIN_TRACE, ("Checksumming buffer (0x%p) Size (%d)\n", Buffer, Size)); UlongCount = Size / 4; // Number of ULONGs Checksum = Seed; // Init checksum diff --git a/reactos/tools/cabman/makefile b/reactos/tools/cabman/makefile index 3761209d826..a3f779e9b3d 100755 --- a/reactos/tools/cabman/makefile +++ b/reactos/tools/cabman/makefile @@ -33,12 +33,11 @@ dfp.o: dfp.cxx cabman$(EXE_POSTFIX): $(OBJECTS) $(HOST_CXX) $(OBJECTS) $(HOST_LFLAGS) -o cabman$(EXE_POSTFIX) -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: rm -f *.o rm -f cabman$(EXE_POSTFIX) -endif -ifeq ($(HOST),mingw32-windows) +else clean: -del *.o -del cabman$(EXE_POSTFIX) diff --git a/reactos/tools/cdmake/Makefile b/reactos/tools/cdmake/Makefile index dc7664f85e4..787f8a2f061 100644 --- a/reactos/tools/cdmake/Makefile +++ b/reactos/tools/cdmake/Makefile @@ -22,12 +22,11 @@ llmosrt.o: llmosrt.c cdmake$(EXE_POSTFIX): $(OBJECTS) $(HOST_CC) $(OBJECTS) -o cdmake$(EXE_POSTFIX) -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: rm -f *.o rm -f cdmake$(EXE_POSTFIX) -endif -ifeq ($(HOST),mingw32-windows) +else clean: -del *.o -del cdmake$(EXE_POSTFIX) diff --git a/reactos/tools/helper.mk b/reactos/tools/helper.mk index c879636604a..625eedf6bd9 100644 --- a/reactos/tools/helper.mk +++ b/reactos/tools/helper.mk @@ -230,6 +230,7 @@ ifeq ($(TARGET_TYPE),host_library) MK_DEFEXT := .a MK_CFLAGS := MK_CPPFLAGS := + MK_HOST_CFLAGS := yes MK_LIBPATH := . MK_IMPLIB := no MK_IMPLIBONLY := no @@ -513,6 +514,7 @@ ifeq ($(TARGET_TYPE),winedll) MK_SDKLIBS := MK_CFLAGS := -D__USE_W32API -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x501 -DWINVER=0x501 -D_STDDEF_H -I$(PATH_TO_TOP)/include/wine MK_CPPFLAGS := -D__USE_W32API -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x501 -DWINVER=0x501 -D__need_offsetof -I$(PATH_TO_TOP)/include -I$(PATH_TO_TOP)/include/wine + MK_HOST_CFLAGS := yes MK_PREPROC_FOR_RC_FLAGS := -xc -E -DRC_INVOKED -D__USE_W32API -I$(PATH_TO_TOP)/include/wine -I$(PATH_TO_TOP)/include -I$(PATH_TO_TOP)/w32api/include MK_IMPLIB := yes MK_IMPLIBONLY := no @@ -547,6 +549,7 @@ ifeq ($(TARGET_TYPE),winedrv) MK_SDKLIBS := MK_CFLAGS := -D__USE_W32API -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x501 -DWINVER=0x501 -D__need_offsetof -I$(PATH_TO_TOP)/include/wine MK_CPPFLAGS := -D__USE_W32API -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x501 -DWINVER=0x501 -D__need_offsetof -I$(PATH_TO_TOP)/include -I$(PATH_TO_TOP)/include/wine + MK_HOST_CFLAGS := yes MK_RCFLAGS := --define __USE_W32API --include-dir $(PATH_TO_TOP)/include/wine MK_IMPLIB := yes MK_IMPLIBONLY := no @@ -641,6 +644,13 @@ ifeq ($(MK_MODE),user) endif endif +ifeq ($(MK_HOST_CFLAGS),yes) + MK_CFLAGS += $(HOST_STD_CFLAGS) + MK_CPPFLAGS += $(HOST_STD_CPPFLAGS) +else + MK_CFLAGS += $(STD_CFLAGS) + MK_CPPFLAGS += $(STD_CPPFLAGS) +endif ifeq ($(MK_MODE),kernel) MK_DEFBASE := 0x10000 @@ -709,9 +719,9 @@ endif include $(PATH_TO_TOP)/config -TARGET_CFLAGS += $(MK_CFLAGS) $(STD_CFLAGS) -g +TARGET_CFLAGS += $(MK_CFLAGS) -g -TARGET_CPPFLAGS += $(MK_CPPFLAGS) $(STD_CPPFLAGS) -g +TARGET_CPPFLAGS += $(MK_CPPFLAGS) -g TARGET_RCFLAGS += $(MK_RCFLAGS) $(STD_RCFLAGS) @@ -767,7 +777,7 @@ endif ifeq ($(TARGET_WINETESTS),yes) all: - $(MAKE) -C winetests - MK_REGTESTS_CLEAN := clean_winetests + MK_REGTESTS_CLEAN := clean_winetests endif ifeq ($(TARGET_INSTALL),) diff --git a/reactos/tools/mkhive/Makefile b/reactos/tools/mkhive/Makefile index 248acaf7508..ed1c38815d0 100644 --- a/reactos/tools/mkhive/Makefile +++ b/reactos/tools/mkhive/Makefile @@ -36,6 +36,11 @@ clean: rm -f *.o rm -f mkhive$(EXE_POSTFIX) endif +ifeq ($(HOST),mingw32-linux64) +clean: + rm -f *.o + rm -f mkhive$(EXE_POSTFIX) +endif ifeq ($(HOST),mingw32-windows) clean: -del *.o diff --git a/reactos/tools/rgenstat/Makefile b/reactos/tools/rgenstat/Makefile index 9cad0150176..7723119e9f6 100755 --- a/reactos/tools/rgenstat/Makefile +++ b/reactos/tools/rgenstat/Makefile @@ -19,12 +19,11 @@ llmosrt.o: llmosrt.c rgenstat$(EXE_POSTFIX): $(OBJECTS) $(HOST_CC) $(OBJECTS) -o rgenstat$(EXE_POSTFIX) -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: rm -f *.o rm -f rgenstat$(EXE_POSTFIX) -endif -ifeq ($(HOST),mingw32-windows) +else clean: -del *.o -del rgenstat$(EXE_POSTFIX) diff --git a/reactos/tools/tools-check.mak b/reactos/tools/tools-check.mak index 89e3b3a1c86..dc0626a6be9 100644 --- a/reactos/tools/tools-check.mak +++ b/reactos/tools/tools-check.mak @@ -12,10 +12,9 @@ include $(PATH_TO_TOP)/rules.mak BINUTILS_VERSION_DATE=$(word 5,$(shell $(PREFIX)ld -v)) all: -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) @echo "#define BINUTILS_VERSION_DATE $(BINUTILS_VERSION_DATE)" > tools-check.h -endif -ifeq ($(HOST),mingw32-windows) +else @echo #define BINUTILS_VERSION_DATE $(BINUTILS_VERSION_DATE) > tools-check.h endif $(HOST_CC) -c tools-check.c -o tools-check.temp diff --git a/reactos/tools/widl/Makefile b/reactos/tools/widl/Makefile index b70896aaa0e..835138347c3 100644 --- a/reactos/tools/widl/Makefile +++ b/reactos/tools/widl/Makefile @@ -34,7 +34,7 @@ LIBS = $(LIB_WPP_DIR)/libwpp.a CLEAN_FILES = *.o $(TARGET) -HOST_CFLAGS = -DYYDEBUG=1 -DINT16=SHORT -D__USE_W32API \ +HOST_CFLAGS = $(HOSTARCH) -DYYDEBUG=1 -DINT16=SHORT -D__USE_W32API \ -I$(LIB_WPP_DIR) -I$(PATH_TO_TOP)/include/wine \ -I$(PATH_TO_TOP)/include -I$(PATH_TO_TOP)/w32api/include \ -Werror -Wall @@ -43,13 +43,12 @@ HOST_CFLAGS = -DYYDEBUG=1 -DINT16=SHORT -D__USE_W32API \ $(HOST_CC) $(HOST_CFLAGS) -c $< -o $@ $(TARGET): $(OBJECTS) $(LIBS) - $(HOST_CC) -o $(TARGET) $(OBJECTS) $(LIBS) + $(HOST_CC) $(HOSTARCH) -o $(TARGET) $(OBJECTS) $(LIBS) -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: -rm -f $(OBJECTS) $(TARGET) -endif -ifneq ($(HOST),mingw32-linux) +else clean: -del $(TARGET) -del *.o diff --git a/reactos/tools/wine2ros/Makefile b/reactos/tools/wine2ros/Makefile index 63196cbe826..07e2fefdd02 100644 --- a/reactos/tools/wine2ros/Makefile +++ b/reactos/tools/wine2ros/Makefile @@ -16,11 +16,10 @@ wine2ros.o: wine2ros.c wine2ros$(EXE_POSTFIX): $(OBJECTS) $(HOST_CC) -g $(OBJECTS) -o $(TARGET) -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: rm -f *.o $(TARGET) -endif -ifneq ($(HOST),mingw32-linux) +else clean: del *.o $(TARGET) endif diff --git a/reactos/tools/winebuild/Makefile b/reactos/tools/winebuild/Makefile index 925892a46bc..6d7cec5f718 100644 --- a/reactos/tools/winebuild/Makefile +++ b/reactos/tools/winebuild/Makefile @@ -22,19 +22,23 @@ OBJECTS = \ CLEAN_FILES = *.o $(TARGET) -HOST_CFLAGS = -D__USE_W32API -I$(PATH_TO_TOP)/include/wine +HOST_CFLAGS = $(HOSTARCH) -D__USE_W32API -I$(PATH_TO_TOP)/include/wine %.o: %.c $(HOST_CC) $(HOST_CFLAGS) -c $< -o $@ $(TARGET): $(OBJECTS) - $(HOST_CC) $(OBJECTS) -o $(TARGET) + $(HOST_CC) $(HOSTARCH) $(OBJECTS) -o $(TARGET) ifeq ($(HOST),mingw32-linux) clean: rm -f $(CLEAN_FILES) endif -ifneq ($(HOST),mingw32-linux) +ifeq ($(HOST),mingw32-linux64) +clean: + rm -f $(CLEAN_FILES) +endif +ifeq ($(HOST),mingw32-windows) clean: del $(CLEAN_FILES) endif diff --git a/reactos/tools/winebuild/import.c b/reactos/tools/winebuild/import.c index aa655375e95..0a6aff1b3d1 100644 --- a/reactos/tools/winebuild/import.c +++ b/reactos/tools/winebuild/import.c @@ -703,6 +703,7 @@ static int output_immediate_imports( FILE *outfile ) fprintf( outfile, " \"\\t.globl " __ASM_NAME("%s") "\\n\"\n", name ); fprintf( outfile, " \"" __ASM_NAME("%s") ":\\n\\t", name); +#ifndef __REACTOS__ #if defined(__i386__) if (strstr( name, "__wine_call_from_16" )) fprintf( outfile, ".byte 0x2e\\n\\tjmp *(imports+%d)\\n\\tnop\\n", pos ); @@ -754,6 +755,7 @@ static int output_immediate_imports( FILE *outfile ) #else #error You need to define import thunks for your architecture! #endif +#endif /*__REACTOS__*/ fprintf( outfile, "\"\n" ); output_function_size( outfile, name ); } diff --git a/reactos/tools/wmc/makefile b/reactos/tools/wmc/makefile index 5a471b5247b..8b0c8ad6218 100644 --- a/reactos/tools/wmc/makefile +++ b/reactos/tools/wmc/makefile @@ -40,12 +40,11 @@ write.o: write.c y_tab.o: y_tab.c $(HOST_CC) $(HOST_CFLAGS) -g -c y_tab.c -o y_tab.o -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: rm -f *.o rm -f wmc$(EXE_POSTFIX) -endif -ifeq ($(HOST),mingw32-windows) +else clean: -del *.o -del wmc$(EXE_POSTFIX) diff --git a/reactos/tools/wpp/Makefile b/reactos/tools/wpp/Makefile index 32288175b14..7b7ad966f7e 100644 --- a/reactos/tools/wpp/Makefile +++ b/reactos/tools/wpp/Makefile @@ -6,7 +6,7 @@ TARGET_TYPE = host_library TARGET_NAME = wpp -TARGET_CFLAGS = -D__USE_W32API -I$(PATH_TO_TOP)/include/wine +TARGET_CFLAGS = $(HOSTARCH) -D__USE_W32API -I$(PATH_TO_TOP)/include/wine TARGET_OBJECTS = preproc.o wpp.o wpp.tab.o lex.yy.o diff --git a/reactos/tools/wrc/Makefile b/reactos/tools/wrc/Makefile index db39b91d2d7..55c076f4a87 100644 --- a/reactos/tools/wrc/Makefile +++ b/reactos/tools/wrc/Makefile @@ -33,7 +33,7 @@ LIBS = $(LIB_UNICODE_DIR)/libunicode.a $(LIB_WPP_DIR)/libwpp.a CLEAN_FILES = *.o $(TARGET) -HOST_CFLAGS = -D__USE_W32API -DWINE_UNICODE_API= \ +HOST_CFLAGS = $(HOSTARCH) -D__USE_W32API -DWINE_UNICODE_API= \ -Dwchar_t="unsigned short" -D_WCHAR_T_DEFINED \ -I$(LIB_UNICODE_DIR) -I$(LIB_WPP_DIR) -I$(PATH_TO_TOP)/include/wine \ -I$(PATH_TO_TOP)/include -I$(PATH_TO_TOP)/w32api/include @@ -42,13 +42,12 @@ HOST_CFLAGS = -D__USE_W32API -DWINE_UNICODE_API= \ $(HOST_CC) $(HOST_CFLAGS) -c $< -o $@ $(TARGET): $(OBJECTS) $(LIBS) - $(HOST_CC) -o $(TARGET) $(OBJECTS) $(LIBS) + $(HOST_CC) $(HOSTARCH) -o $(TARGET) $(OBJECTS) $(LIBS) -ifeq ($(HOST),mingw32-linux) +ifeq ($(HOST_TYPE),unix) clean: -rm -f $(OBJECTS) $(TARGET) -endif -ifneq ($(HOST),mingw32-linux) +else clean: -del $(TARGET) -del *.o