mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix Windows cross build
commit 59294029f3d1 ("Capitalize package name and add capitalized tar-ball prefix") had an unintended side effect: the cross build for Windows on Linux no longer worked (as it set NAME=subsurface.exe). Fixed this by introducing a TARGET variable that is derived from $(NAME). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ff417cb140
commit
ce46a60caf
2 changed files with 7 additions and 5 deletions
10
Makefile
10
Makefile
|
@ -1,5 +1,6 @@
|
|||
NAME = subsurface
|
||||
CAPITALIZED_NAME = Subsurface
|
||||
TARGET = $(NAME)
|
||||
|
||||
VERSION=3.1
|
||||
|
||||
|
@ -72,6 +73,7 @@ ifeq ($(CC), i686-w64-mingw32-gcc)
|
|||
RESFILE = packaging/windows/$(NAME).res
|
||||
LDFLAGS += -Wl,-subsystem,windows
|
||||
LIBWINSOCK = -lwsock32
|
||||
TARGET = $(NAME).exe
|
||||
else ifeq ($(UNAME), darwin)
|
||||
LIBDIVECOMPUTERINCLUDES = $(shell $(PKGCONFIG) --cflags libdivecomputer)
|
||||
LIBDIVECOMPUTERARCHIVE = $(shell $(PKGCONFIG) --libs libdivecomputer)
|
||||
|
@ -187,11 +189,11 @@ OBJS = main.o dive.o time.o profile.o info.o equipment.o divelist.o deco.o plann
|
|||
|
||||
DEPS = $(wildcard .dep/*.dep)
|
||||
|
||||
all: $(NAME)
|
||||
all: $(TARGET)
|
||||
|
||||
$(NAME): gen_version_file $(OBJS) $(MSGOBJS) $(INFOPLIST)
|
||||
@$(PRETTYECHO) ' LINK' $(NAME)
|
||||
$(COMPILE_PREFIX)$(CC) $(LDFLAGS) -o $(NAME) $(OBJS) $(LIBS)
|
||||
$(TARGET): gen_version_file $(OBJS) $(MSGOBJS) $(INFOPLIST)
|
||||
@$(PRETTYECHO) ' LINK' $(TARGET)
|
||||
$(COMPILE_PREFIX)$(CC) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
|
||||
|
||||
gen_version_file:
|
||||
ifneq ($(STORED_VERSION_STRING),$(VERSION_STRING))
|
||||
|
|
|
@ -16,4 +16,4 @@ make CC=i686-w64-mingw32-gcc \
|
|||
PKG_CONFIG_PATH=/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig/ \
|
||||
CROSS_PATH=/usr/i686-w64-mingw32/sys-root/mingw/ \
|
||||
XSLTCONFIG=/usr/i686-w64-mingw32/sys-root/mingw/bin/xslt-config \
|
||||
XML2CONFIG=/usr/i686-w64-mingw32/sys-root/mingw/bin/xml2-config NAME=subsurface.exe install-cross-windows $@
|
||||
XML2CONFIG=/usr/i686-w64-mingw32/sys-root/mingw/bin/xml2-config install-cross-windows $@
|
||||
|
|
Loading…
Add table
Reference in a new issue