From b9092401f6b279525775bedd02354beae996dbc8 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sat, 11 Mar 2017 11:48:21 -0500 Subject: [PATCH] mingw32 makefile --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 34f1803..a1c6b27 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,15 @@ CCFLAGS = -g DUMP_OBJS = dumpobj.o disassembler.o zrdz_disassembler.o LINK_OBJS = link.o expression.o omf.o set_file_type.o finder_info_helper.o -#UNAME_S := $(shell uname -s) -#ifeq ($(UNAME_S),MINGW64_NT-10.0) +# static link if using mingw32 or mingw64 to make redistribution easier. +# also add mingw directory. +ifeq ($(MSYSTEM),MINGW32) + DUMP_OBJS += mingw/err.o + LINK_OBJS += mingw/err.o + CPPFLAGS += -I mingw/ + LDLIBS += -static +endif + ifeq ($(MSYSTEM),MINGW64) DUMP_OBJS += mingw/err.o LINK_OBJS += mingw/err.o