-
-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy pathMakefile.win
63 lines (50 loc) · 1.92 KB
/
Makefile.win
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Reverse Engineer's Hex Editor
# Copyright (C) 2018-2020 Daniel Collins <[email protected]>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
EXE := rehex.exe
EMBED_EXE := tools/embed.exe
GTKCONFIG_EXE := tools/gtk-config.exe
EXTRA_APP_OBJS := res/winres.o
HELP_TARGET := rehex.chm
WX_CONFIG ?= wx-config --static
LDFLAGS ?= -Wl,-Bstatic
LDLIBS += -lstdc++ -lwinpthread -liconv -Wl,-Bdynamic -static-libgcc -static-libstdc++ -lole32
# Needed for PRIxNN macros from inttypes.h under MinGW
CFLAGS += -D__STDC_FORMAT_MACROS
CXXFLAGS += -D__STDC_FORMAT_MACROS
# Define this otherwise MinGW's libunistring tries importing some of its
# symbols from DLL (we link statically).
CFLAGS += -DIN_LIBUNISTRING
CXXFLAGS += -DIN_LIBUNISTRING
# Include compatibility headers
CFLAGS += -Iinclude/gcc-win-include/
CXXFLAGS += -Iinclude/gcc-win-include/
CFLAGS += -DREHEX_CACHE_STRING_BITMAPS
CXXFLAGS += -DREHEX_CACHE_STRING_BITMAPS
include Makefile
DISTDIR ?= rehex-$(VERSION)
windist: $(EXE) $(HELP_TARGET)
mkdir $(DISTDIR)
cp $(EXE) $(DISTDIR)
ifneq ($(BUILD_HELP),0)
cp rehex.chm $(DISTDIR)
endif
mkdir $(DISTDIR)/Plugins/
for p in $(PLUGINS); \
do \
$(MAKE) -C plugins/$${p} PLUGINS_INST_DIR=$$(realpath $(DISTDIR)/Plugins/) install || exit $$?; \
done
res/winres.o: res/winres.rc res/winres.h
windres $< $@