summaryrefslogtreecommitdiff
path: root/Makefile.MGW32
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.MGW32')
-rw-r--r--Makefile.MGW3224
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile.MGW32 b/Makefile.MGW32
new file mode 100644
index 0000000..5052028
--- /dev/null
+++ b/Makefile.MGW32
@@ -0,0 +1,24 @@
+CXX = x86_64-w64-mingw32-c++
+AR = x86_64-w64-mingw32-ar
+CXX_LDD = x86_64-w64-mingw32-ld
+LDD = x86_64-w64-mingw32-ld
+
+WIN32_DLL_DIR = win32_dlls
+
+MGWLIBS = $(wildcard $(WIN32_DLL_DIR)/libgcc*.dll) $(wildcard $(WIN32_DLL_DIR)/libstd*.dll)
+
+WXLIBS = $(wildcard $(WIN32_DLL_DIR)/wx*.dll)
+WXLDFLAGS = -L. -Wl,-Bdynamic $(addprefix -l, $(basename $(WXLIBS)))
+
+WXINCLUDES = -Iwxmsw/include/x86_64-w64-mingw32-msw-unicode-3.2 -Iwxmsw/include
+WXFLAGS = -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -pthread $(WXINCLUDES)
+CXXFLAGS = -static -std=c++11 -lwinpthread -I/usr/lib/gcc/x86_64-w64-mingw32/12-win32/include $(WXFLAGS)
+
+all: translit
+translit: translit.cpp
+ $(CXX) $(CXXFLAGS) -o translit.exe translit.cpp $(WXLDFLAGS)
+ mkdir -p release && cp -r translit.exe $(MGWLIBS) $(WXLIBS) release
+
+.PHONY: clean
+clean:
+ rm -f *.o *.a */*.o */*.a translit.exe release/*