Add support to Makefile for Darwin/MacOS platform

pull/1005/head
Chris Bednarczyk 2023-07-30 19:44:41 +02:00
rodzic 217f0a25fe
commit f7b70e4c64
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -138,6 +138,12 @@ ifeq ($(shell uname -s),FreeBSD)
USBLIB = -lusb
endif
ifeq ($(shell uname -s),Darwin)
CXXFLAGS += -I$(shell brew --prefix)/include
LDFLAGS += -L$(shell brew --prefix)/lib
USBLIB = -lusb-1.0
endif
$(BUILD)/%.o: src/%.cc $(wildcard src/%.h)
$(CXX) $(CXXFLAGS) $< -c -E > $@.src
$(CXX) $(CXXFLAGS) $< -MMD -c -o $@