2020-06-12 22:43:45 +02:00
|
|
|
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
|
|
|
|
|
2020-06-12 22:43:45 +02:00
|
|
|
libaudiofile.a: audiofile.o
|
2022-03-13 09:17:10 +01:00
|
|
|
$(AR) rcs $@ $^
|
2020-06-12 22:43:45 +02:00
|
|
|
|
|
|
|
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 $@
|
2020-06-12 22:43:45 +02:00
|
|
|
|
|
|
|
clean:
|
2022-03-13 09:17:10 +01:00
|
|
|
$(RM) audiofile.o libaudiofile.a
|
2020-06-12 22:43:45 +02:00
|
|
|
|
|
|
|
.PHONY: clean
|