mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-24 06:50:20 +01:00
build: x64 stuff for makefiles
This commit is contained in:
parent
2233cde3bd
commit
35fcbf2201
19
Makefile
19
Makefile
@ -10,6 +10,8 @@ else
|
||||
endif
|
||||
DEF_CFLAGS += -DVGMSTREAM_VERSION_AUTO -DVGM_LOG_OUTPUT
|
||||
|
||||
VGM_X64=0
|
||||
|
||||
###############################################################################
|
||||
### external defs
|
||||
# currently aimed to WIN32 builds but vgmstream-cli should work for others (or use autotools instead)
|
||||
@ -28,7 +30,13 @@ ifeq ($(TARGET_OS),Windows_NT)
|
||||
STRIP = strip
|
||||
WINDRES = windres
|
||||
DLLTOOL = dlltool
|
||||
#DLLTOOL = dlltool -m i386:x86-64 --as-flags --64
|
||||
|
||||
DLL_DIR = .
|
||||
export DLL_DIR
|
||||
ifneq ($(VGM_X64),0)
|
||||
DLLTOOL = dlltool -m i386:x86-64 --as-flags --64
|
||||
DLL_DIR = dll-x64
|
||||
endif
|
||||
|
||||
# same thing, the above should be available
|
||||
#CC = i686-w64-mingw32-gcc
|
||||
@ -86,6 +94,15 @@ LIBS_CFLAGS=
|
||||
LIBS_LDFLAGS=
|
||||
LIBS_TARGET_EXT_LIBS=
|
||||
|
||||
### bit stuff
|
||||
# TODO: some targets don't work with X64 (Winamp, etc), detect
|
||||
#ifneq ($(VGM_X86),0)
|
||||
# DEF_CFLAGS += -m32
|
||||
#endif
|
||||
ifneq ($(VGM_X64),0)
|
||||
DEF_CFLAGS += -m64
|
||||
endif
|
||||
|
||||
# config libs
|
||||
VGM_G7221 = 1
|
||||
ifneq ($(VGM_G7221),0)
|
||||
|
@ -18,7 +18,7 @@ ifeq ($(TARGET_OS),Windows_NT)
|
||||
|
||||
# -DUSE_ALLOCA
|
||||
CFLAGS += -DWIN32 -I../ext_includes -I../ext_libs/Getopt
|
||||
LDFLAGS += -L../ext_libs
|
||||
LDFLAGS += -L../ext_libs/$(DLL_DIR)
|
||||
|
||||
LIBAO_INC = -I$(LIBAO_IPATH)
|
||||
LIBAO_LIB = -L$(LIBAO_LPATH) -lao
|
||||
|
@ -12,10 +12,10 @@
|
||||
# -D is optional, but needed if DLL was renamed (like libcelts)
|
||||
|
||||
# patterns match ($@ = target, $< = dependency, for others substitute)
|
||||
%.dll.a : %.def
|
||||
$(DLLTOOL) -D $(patsubst %.def,%.dll,$<) -d $< -l $@
|
||||
%.dll.a:
|
||||
$(DLLTOOL) -D $(DLL_DIR)/$(patsubst %.dll.a,%.dll,$@) -d $(DLL_DIR)/$(patsubst %.dll.a,%.def,$@) -l $(DLL_DIR)/$@
|
||||
|
||||
clean:
|
||||
$(RMF) *.dll.a
|
||||
$(RMF) $(DLL_DIR)/*.dll.a
|
||||
|
||||
.PHONY: clean
|
||||
|
@ -23,7 +23,7 @@ OUTPUT_WINAMP = in_vgmstream.dll
|
||||
|
||||
ifeq ($(TARGET_OS),Windows_NT)
|
||||
CFLAGS += -DWIN32 -m32 -DUSE_ALLOCA -I../ext_includes
|
||||
LDFLAGS += -L../ext_libs
|
||||
LDFLAGS += -L../ext_libs/$(DLL_DIR)
|
||||
endif
|
||||
|
||||
CFLAGS += $(LIBS_CFLAGS)
|
||||
|
@ -21,7 +21,7 @@ ifeq ($(TARGET_OS),Windows_NT)
|
||||
endif
|
||||
|
||||
CFLAGS += $(DEF_CFLAGS) -I../ext_includes $(EXTRA_CFLAGS)
|
||||
LDFLAGS += -L../src -L../ext_libs -lvgmstream -lm $(EXTRA_LDFLAGS)
|
||||
LDFLAGS += -L../src -L../ext_libs/$(DLL_DIR) -lvgmstream -lm $(EXTRA_LDFLAGS)
|
||||
TARGET_EXT_LIBS =
|
||||
|
||||
CFLAGS += $(LIBS_CFLAGS)
|
||||
|
Loading…
Reference in New Issue
Block a user