synth/alchitry-loader/makefile

25 lines
507 B
Makefile
Raw Permalink Normal View History

2022-05-17 03:36:27 +00:00
sources = $(wildcard src/*.cpp)
objects = $(sources:.cpp=.o)
static_libs = lib/macos/libftd2xx.a
libs = -lpthread
CXXFLAGS = -std=c++11
UNAME := $(shell uname)
# Assume target is Mac OS if build host is Mac OS; any other host targets Linux
ifeq ($(UNAME), Darwin)
libs += -lobjc -framework IOKit -framework CoreFoundation
else
libs += -lrt
endif
all: loader
loader: $(objects)
$(CXX) $(LDFLAGS) -o $@ $^ $(static_libs) $(libs)
.PHONY: clean
clean:
rm -rf loader $(objects)