summaryrefslogtreecommitdiff
path: root/mnv/src/GmnvExt/Make_ming.mak
diff options
context:
space:
mode:
authorMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-04 12:41:27 +0300
committerMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-04 12:41:27 +0300
commit4f2d36194b4f299aa7509d815c07121039ea833b (patch)
treef3ded014bad3a4c76ff6a22b8726ebaab68c3d13 /mnv/src/GmnvExt/Make_ming.mak
parent5b578e70c314723a3cde5c9bfc2be0bf1dadc93b (diff)
downloadProject-Tick-4f2d36194b4f299aa7509d815c07121039ea833b.tar.gz
Project-Tick-4f2d36194b4f299aa7509d815c07121039ea833b.zip
NOISSUE change uvim folder name to mnv
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
Diffstat (limited to 'mnv/src/GmnvExt/Make_ming.mak')
-rw-r--r--mnv/src/GmnvExt/Make_ming.mak96
1 files changed, 96 insertions, 0 deletions
diff --git a/mnv/src/GmnvExt/Make_ming.mak b/mnv/src/GmnvExt/Make_ming.mak
new file mode 100644
index 0000000000..cd48a818c6
--- /dev/null
+++ b/mnv/src/GmnvExt/Make_ming.mak
@@ -0,0 +1,96 @@
+# Project: gmnvext
+# Generates gmnvext.dll with gcc.
+# To be used with MingW and Cygwin.
+#
+# Originally, the DLL base address was fixed: -Wl,--image-base=0x1C000000
+# Now it is allocated dynamically by the linker by evaluating all DLLs
+# already loaded in memory. The binary image contains as well information
+# for automatic pseudo-rebasing, if needed by the system. ALV 2004-02-29
+
+# If cross-compiling set this to yes, else set it to no
+CROSS = no
+#CROSS = yes
+# For the old MinGW 2.95 (the one you get e.g. with debian woody)
+# set the following variable to yes and check if the executables are
+# really named that way.
+# If you have a newer MinGW or you are using cygwin set it to no and
+# check also the executables
+MINGWOLD = no
+
+# Link against the shared versions of libgcc/libstdc++ by default. Set
+# STATIC_STDCPLUS to "yes" to link against static versions instead.
+STATIC_STDCPLUS=no
+#STATIC_STDCPLUS=yes
+
+# If you use TDM-GCC(-64), change HAS_GCC_EH to "no".
+# This is used when STATIC_STDCPLUS=yes.
+HAS_GCC_EH=yes
+
+STATIC_LIBS=
+
+# Note: -static-libstdc++ is not available until gcc 4.5.x.
+LDFLAGS += -shared
+ifeq (yes, $(STATIC_STDCPLUS))
+LDFLAGS += -static-libgcc -static-libstdc++
+# Order important: gcc_eh must be placed before winpthread
+STATIC_LIBS += -lstdc++ -lgcc
+ ifeq (yes, $(HAS_GCC_EH))
+STATIC_LIBS += -lgcc_eh
+ endif
+STATIC_LIBS += -lwinpthread
+endif
+
+ifeq ($(CROSS),yes)
+DEL = rm -f
+ifeq ($(MINGWOLD),yes)
+CXXFLAGS := -O2 -fvtable-thunks
+else
+CXXFLAGS := -O2
+endif
+else
+CXXFLAGS := -O2
+ifneq (sh.exe, $(SHELL))
+DEL = rm -f
+else
+DEL = del
+endif
+endif
+# Set the default $(WINVER) to make it work with Windows 7.
+ifndef WINVER
+WINVER = 0x0601
+endif
+CXX := $(CROSS_COMPILE)g++
+WINDRES := $(CROSS_COMPILE)windres
+# this used to have --preprocessor, but it's no longer supported
+WINDRES_FLAGS =
+LIBS := -luuid -lgdi32
+RES := gmnvext.res
+ifeq ($(findstring clang++,$(CXX)),)
+DEFFILE = gmnvext_ming.def
+endif
+OBJ := gmnvext.o
+
+DLL := gmnvext.dll
+
+.PHONY: all all-before all-after clean clean-custom
+
+all: all-before $(DLL) all-after
+
+$(DLL): $(OBJ) $(RES) $(DEFFILE)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) -s -o $@ \
+ -Wl,--enable-auto-image-base \
+ -Wl,--enable-auto-import \
+ -Wl,--whole-archive \
+ $^ \
+ -Wl,--no-whole-archive \
+ $(LIBS) \
+ -Wl,-Bstatic $(STATIC_LIBS) -Wl,-Bdynamic
+
+gmnvext.o: gmnvext.cpp
+ $(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) -c $? -o $@
+
+$(RES): gmnvext_ming.rc
+ $(WINDRES) $(WINDRES_FLAGS) --input-format=rc --output-format=coff -DMING $? -o $@
+
+clean: clean-custom
+ -$(DEL) $(OBJ) $(RES) $(DLL)