diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 31 |
1 files changed, 31 insertions, 0 deletions
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) |