added Threefish cipher as submodule
This commit is contained in:
19
makefile
19
makefile
@ -8,7 +8,7 @@ SRC_EXT = cpp
|
||||
# Path to the source directory, relative to the makefile
|
||||
SRC_PATH = src
|
||||
# Space-separated pkg-config libraries used by this project
|
||||
LIBS =
|
||||
LIBS = lib
|
||||
# General compiler flags
|
||||
COMPILE_FLAGS = -std=c++17 -Wall -Wextra -g
|
||||
# Additional release-specific flags
|
||||
@ -18,9 +18,12 @@ DCOMPILE_FLAGS = -D DEBUG
|
||||
# Add additional include paths
|
||||
INCLUDES = include
|
||||
# General linker settings
|
||||
LINK_FLAGS = -lpthread -lncurses
|
||||
LINK_FLAGS = -Llib -lpthread -lncurses -ltfng
|
||||
|
||||
# Doc
|
||||
DOCDIR = doc
|
||||
TFRANDDIR = tfnoisegen
|
||||
TFRANDLIB = libtfng.a
|
||||
#### END PROJECT SETTINGS ####
|
||||
|
||||
# Optionally you may move the section above to a separate config.mk file, and
|
||||
@ -52,7 +55,7 @@ endif
|
||||
|
||||
# Combine compiler and linker flags
|
||||
release: export CXXFLAGS := $(CXXFLAGS) $(COMPILE_FLAGS) $(RCOMPILE_FLAGS)
|
||||
release: export LDFLAGS := $(LDFLAGS) $(LINK_FLAGS) $(RLINK_FLAGS)
|
||||
release: export LDFLAGS := $(LDFLAGS) $(LINK_FLAGS) $(RLINK_FLAGS)
|
||||
debug: export CXXFLAGS := $(CXXFLAGS) $(COMPILE_FLAGS) $(DCOMPILE_FLAGS)
|
||||
debug: export LDFLAGS := $(LDFLAGS) $(LINK_FLAGS) $(DLINK_FLAGS)
|
||||
|
||||
@ -158,6 +161,7 @@ dirs:
|
||||
@echo "Creating directories"
|
||||
@mkdir -p $(dir $(OBJECTS))
|
||||
@mkdir -p $(BIN_PATH)
|
||||
@mkdir -p $(LIBS)
|
||||
|
||||
# Removes all build files
|
||||
.PHONY: clean
|
||||
@ -167,18 +171,27 @@ clean:
|
||||
@echo "Deleting directories"
|
||||
@$(RM) -r build
|
||||
@$(RM) -r bin
|
||||
@$(RM) -r $(LIBS)
|
||||
@$(RM) -f reHDD.log
|
||||
$(MAKE) clean -C tfnoisegen
|
||||
|
||||
# Main rule, checks the executable and symlinks to the output
|
||||
all: $(BIN_PATH)/$(BIN_NAME)
|
||||
$(MAKE) libtfng.a -C tfnoisegen
|
||||
@cp $(TFRANDDIR)/$(TFRANDLIB) $(LIBS)
|
||||
|
||||
@echo "Making symlink: $(BIN_NAME) -> $<"
|
||||
@$(RM) $(BIN_NAME)
|
||||
@ln -s $(BIN_PATH)/$(BIN_NAME) $(BIN_NAME)
|
||||
|
||||
# Link the executable
|
||||
$(BIN_PATH)/$(BIN_NAME): $(OBJECTS)
|
||||
$(MAKE) libtfng.a -C tfnoisegen
|
||||
@cp $(TFRANDDIR)/$(TFRANDLIB) $(LIBS)
|
||||
@echo "Linking: $@"
|
||||
@$(START_TIME)
|
||||
@echo $(LDFLAGS)
|
||||
@ls lib/
|
||||
$(CMD_PREFIX)$(CXX) $(OBJECTS) $(LDFLAGS) -o $@
|
||||
@echo -en "\t Link time: "
|
||||
@$(END_TIME)
|
||||
|
Reference in New Issue
Block a user