From c4aec144256e3f27fedd8f8de03e10cc08eecab8 Mon Sep 17 00:00:00 2001 From: Mateusz Zalega Date: Thu, 22 Oct 2015 22:41:18 +0200 Subject: Initial --- Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e98e631 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +CC = $(PREFIX)-gcc +CXX = $(PREFIX)-g++ +LD = $(CXX) + +INCLUDE = -Iinclude/ +LIB = -lhidapi-libusb +BUILD = build + +CXXFLAGS = -std=c++14 + +CXXSOURCES = $(wildcard *.cc) +OBJ = $(CXXSOURCES:%.cc:$(BUILD)/%.o) + +$(BUILD)/libnitrokey.so: $(OBJ) + $(CXX) -shared $(OBJ) -o $@ + +$(BUILD)/%.o: %.cc + $(CXX) -c $< -o $@ $(INCLUDE) $(CXXFLAGS) + +all: $(OBJ) $(BUILD)/libnitrokey.so + +clean: + rm $(OBJ) + rm $(BUILD)/libnitrokey.so + +mrproper: clean + rm $(BUILD)/*.d + +.PHONY: all clean mrproper + +include $(wildcard build/*.d) -- cgit v1.2.3