sm64coopdx/tools/audiofile/Makefile

30 lines
669 B
Makefile
Raw Normal View History

CXX := g++
2023-04-23 22:54:27 +02:00
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)
2023-04-23 22:58:16 +02:00
CFLAGS += -DWIN32 -D_WIN32
2023-04-23 22:54:27 +02:00
endif
libaudiofile.a: audiofile.o
$(AR) rcs $@ $^
audiofile.o: audiofile.cpp audiofile.h aupvlist.h
2023-04-23 22:54:27 +02:00
#$(CXX) $(CFLAGS) -std=c++11 -DNDEBUG -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -O2 -I. -c audiofile.cpp
$(CXX) $(CFLAGS) -std=c++11 -O2 -I. -c $< -o $@
clean:
$(RM) audiofile.o libaudiofile.a
.PHONY: clean