diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -1,28 +1,26 @@ CXX = g++ CXXFLAGS = -Wall -Wextra -std=c++0x -fwrapv -LDFLAGS = ifneq ($(DEBUG),) CXXFLAGS += -g else CXXFLAGS += -O2 endif -ifeq ($(shell uname),Linux) - LDFLAGS += -lbsd -endif -BIN = main + +LIBNAME = cryptolib.a + .PHONY: all clean remake -all: $(BIN) +all: $(LIBNAME) clean: - rm -rf $(BIN) *.o *.dSYM + rm -rf $(LIBNAME) *.o remake: clean all -$(BIN): $(patsubst %.cpp,%.o,$(wildcard *.cpp)) - $(CXX) -o $@ $^ $(LDFLAGS) +$(LIBNAME): $(patsubst %.cpp,%.o,$(wildcard *.cpp)) + ar -cr $@ $^ %.o: %.cpp $(wildcard *.h) $(CXX) $(CXXFLAGS) -c -o $@ $< |