Force windows defines on tools
This commit is contained in:
parent
0ec8a42c25
commit
47b03f1c75
|
@ -10,6 +10,20 @@ LDFLAGS := -lm
|
||||||
ALL_PROGRAMS := n64graphics n64graphics_ci mio0 n64cksum textconv patch_libultra_math aifc_decode aiff_extract_codebook vadpcm_enc tabledesign extract_data_for_mio skyconv
|
ALL_PROGRAMS := n64graphics n64graphics_ci mio0 n64cksum textconv patch_libultra_math aifc_decode aiff_extract_codebook vadpcm_enc tabledesign extract_data_for_mio skyconv
|
||||||
LIBAUDIOFILE := audiofile/libaudiofile.a
|
LIBAUDIOFILE := audiofile/libaudiofile.a
|
||||||
|
|
||||||
|
# Attempt to detect OS
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
HOST_OS ?= Windows
|
||||||
|
else
|
||||||
|
HOST_OS ?= $(shell uname -s 2>/dev/null || echo Unknown)
|
||||||
|
# some weird MINGW/Cygwin env that doesn't define $OS
|
||||||
|
ifneq (,$(findstring MINGW,HOST_OS))
|
||||||
|
HOST_OS := Windows
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(HOST_OS),Windows)
|
||||||
|
CFLAGS += -DWIN32 -D_WIN32 -D__CYGWIN__
|
||||||
|
endif
|
||||||
|
|
||||||
BUILD_PROGRAMS := $(ALL_PROGRAMS)
|
BUILD_PROGRAMS := $(ALL_PROGRAMS)
|
||||||
|
|
||||||
default: all
|
default: all
|
||||||
|
|
|
@ -1,11 +1,27 @@
|
||||||
CXX := g++
|
CXX := g++
|
||||||
|
|
||||||
|
CFLAGS :=
|
||||||
|
|
||||||
|
# Attempt to detect OS
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
HOST_OS ?= Windows
|
||||||
|
else
|
||||||
|
HOST_OS ?= $(shell uname -s 2>/dev/null || echo Unknown)
|
||||||
|
# some weird MINGW/Cygwin env that doesn't define $OS
|
||||||
|
ifneq (,$(findstring MINGW,HOST_OS))
|
||||||
|
HOST_OS := Windows
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(HOST_OS),Windows)
|
||||||
|
CFLAGS += -DWIN32 -D_WIN32 -D__CYGWIN__
|
||||||
|
endif
|
||||||
|
|
||||||
libaudiofile.a: audiofile.o
|
libaudiofile.a: audiofile.o
|
||||||
$(AR) rcs $@ $^
|
$(AR) rcs $@ $^
|
||||||
|
|
||||||
audiofile.o: audiofile.cpp audiofile.h aupvlist.h
|
audiofile.o: audiofile.cpp audiofile.h aupvlist.h
|
||||||
#$(CXX) -std=c++11 -DNDEBUG -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -O2 -I. -c audiofile.cpp
|
#$(CXX) $(CFLAGS) -std=c++11 -DNDEBUG -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -O2 -I. -c audiofile.cpp
|
||||||
$(CXX) -std=c++11 -O2 -I. -c $< -o $@
|
$(CXX) $(CFLAGS) -std=c++11 -O2 -I. -c $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) audiofile.o libaudiofile.a
|
$(RM) audiofile.o libaudiofile.a
|
||||||
|
|
|
@ -8,6 +8,20 @@ IRIX_CFLAGS := -fullwarn -woff 515,608,658,799 -Wab,-r4300_mul -g -Xcpluscomm -m
|
||||||
NATIVE_CC := gcc
|
NATIVE_CC := gcc
|
||||||
NATIVE_CFLAGS := -g -Wall -O2 -Wno-unused-result -Wno-uninitialized
|
NATIVE_CFLAGS := -g -Wall -O2 -Wno-unused-result -Wno-uninitialized
|
||||||
|
|
||||||
|
# Attempt to detect OS
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
HOST_OS ?= Windows
|
||||||
|
else
|
||||||
|
HOST_OS ?= $(shell uname -s 2>/dev/null || echo Unknown)
|
||||||
|
# some weird MINGW/Cygwin env that doesn't define $OS
|
||||||
|
ifneq (,$(findstring MINGW,HOST_OS))
|
||||||
|
HOST_OS := Windows
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(HOST_OS),Windows)
|
||||||
|
NATIVE_CFLAGS += -DWIN32 -D_WIN32 -D__CYGWIN__
|
||||||
|
endif
|
||||||
|
|
||||||
default: native
|
default: native
|
||||||
all: irix native
|
all: irix native
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,20 @@ IRIX_CFLAGS := -fullwarn -Wab,-r4300_mul -Xcpluscomm -mips1 -O2
|
||||||
NATIVE_CC := gcc
|
NATIVE_CC := gcc
|
||||||
NATIVE_CFLAGS := -Wall -Wno-uninitialized -O2
|
NATIVE_CFLAGS := -Wall -Wno-uninitialized -O2
|
||||||
|
|
||||||
|
# Attempt to detect OS
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
HOST_OS ?= Windows
|
||||||
|
else
|
||||||
|
HOST_OS ?= $(shell uname -s 2>/dev/null || echo Unknown)
|
||||||
|
# some weird MINGW/Cygwin env that doesn't define $OS
|
||||||
|
ifneq (,$(findstring MINGW,HOST_OS))
|
||||||
|
HOST_OS := Windows
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(HOST_OS),Windows)
|
||||||
|
NATIVE_CFLAGS += -DWIN32 -D_WIN32 -D__CYGWIN__
|
||||||
|
endif
|
||||||
|
|
||||||
LDFLAGS := -lm -laudiofile
|
LDFLAGS := -lm -laudiofile
|
||||||
|
|
||||||
default: native
|
default: native
|
||||||
|
|
Loading…
Reference in New Issue