2020-06-12 20:43:45 +00:00
|
|
|
CXX := g++
|
|
|
|
|
2023-04-23 20:54:27 +00: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 20:58:16 +00:00
|
|
|
CFLAGS += -DWIN32 -D_WIN32
|
2023-04-23 20:54:27 +00:00
|
|
|
endif
|
|
|
|
|
2020-06-12 20:43:45 +00:00
|
|
|
libaudiofile.a: audiofile.o
|
2022-03-13 08:17:10 +00:00
|
|
|
$(AR) rcs $@ $^
|
2020-06-12 20:43:45 +00:00
|
|
|
|
|
|
|
audiofile.o: audiofile.cpp audiofile.h aupvlist.h
|
2023-04-23 20:54:27 +00: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 $@
|
2020-06-12 20:43:45 +00:00
|
|
|
|
|
|
|
clean:
|
2022-03-13 08:17:10 +00:00
|
|
|
$(RM) audiofile.o libaudiofile.a
|
2020-06-12 20:43:45 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|