diff options
author | Mateusz Zalega <mateusz@appliedsourcery.com> | 2015-10-22 23:07:23 +0200 |
---|---|---|
committer | Mateusz Zalega <mateusz@appliedsourcery.com> | 2015-10-22 23:11:42 +0200 |
commit | 3bb6c38ed17c2cf0d2f68bb64fbd24737c4a6677 (patch) | |
tree | 513ae27a2a5ed638954e76a4a78e947d896f2e4f /Makefile | |
parent | c4aec144256e3f27fedd8f8de03e10cc08eecab8 (diff) | |
download | libnitrokey-3bb6c38ed17c2cf0d2f68bb64fbd24737c4a6677.tar.gz libnitrokey-3bb6c38ed17c2cf0d2f68bb64fbd24737c4a6677.tar.bz2 |
Minor fixes, working version
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -6,13 +6,14 @@ INCLUDE = -Iinclude/ LIB = -lhidapi-libusb BUILD = build -CXXFLAGS = -std=c++14 +CXXFLAGS = -std=c++14 -fPIC +SOFLAGS = -shared CXXSOURCES = $(wildcard *.cc) -OBJ = $(CXXSOURCES:%.cc:$(BUILD)/%.o) +OBJ = $(CXXSOURCES:%.cc=$(BUILD)/%.o) $(BUILD)/libnitrokey.so: $(OBJ) - $(CXX) -shared $(OBJ) -o $@ + $(CXX) $(SOFLAGS) $(OBJ) -o $@ $(BUILD)/%.o: %.cc $(CXX) -c $< -o $@ $(INCLUDE) $(CXXFLAGS) @@ -20,12 +21,17 @@ $(BUILD)/%.o: %.cc all: $(OBJ) $(BUILD)/libnitrokey.so clean: - rm $(OBJ) - rm $(BUILD)/libnitrokey.so + rm -f $(OBJ) + rm -f $(BUILD)/libnitrokey.so + make -C unittest clean mrproper: clean - rm $(BUILD)/*.d + rm -f $(BUILD)/*.d -.PHONY: all clean mrproper +unittest: all + make -C unittest + cd unittest/build && ln -fs ../../build/libnitrokey.so . + +.PHONY: all clean mrproper unittest include $(wildcard build/*.d) |