depollueur/Makefile

96 lines
3.5 KiB
Makefile
Raw Normal View History

2021-05-15 17:49:15 +02:00
##########################################################################
# Copyright KAZ 2021 #
# #
# contact (at) kaz.bzh #
# #
# This software is a filter to shrink email by attachment extraction. #
# #
# This software is governed by the CeCILL-B license under French law and #
# abiding by the rules of distribution of free software. You can use, #
# modify and/or redistribute the software under the terms of the #
# CeCILL-B license as circulated by CEA, CNRS and INRIA at the following #
# URL "http://www.cecill.info". #
# #
# As a counterpart to the access to the source code and rights to copy, #
# modify and redistribute granted by the license, users are provided #
# only with a limited warranty and the software's author, the holder of #
# the economic rights, and the successive licensors have only limited #
# liability. #
# #
# In this respect, the user's attention is drawn to the risks associated #
# with loading, using, modifying and/or developing or reproducing the #
# software by the user in light of its specific status of free software, #
# that may mean that it is complicated to manipulate, and that also #
# therefore means that it is reserved for developers and experienced #
# professionals having in-depth computer knowledge. Users are therefore #
# encouraged to load and test the software's suitability as regards #
# their requirements in conditions enabling the security of their #
# systems and/or data to be ensured and, more generally, to use and #
# operate it in the same conditions as regards security. #
# #
# The fact that you are presently reading this means that you have had #
# knowledge of the CeCILL-B license and that you accept its terms. #
##########################################################################
# apt-get install g++ make libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libssl-dev
## DIR #################################
SRC_DIR = ./src
TST_DIR = $(SRC_DIR)/test
CPP_DIR = $(SRC_DIR)/cpp
HPP_DIR = $(SRC_DIR)/include
BLD_DIR = build
OUT_DIR = $(BLD_DIR)/out
LIB_DIR = $(BLD_DIR)/lib
OBJ_DIR = $(BLD_DIR)/obj
KAZ_PRG = eMailShrinker
KAZ_MOD = eMailShrinker EmbeddedData Attachment MainAttachment SizeArg kazDebug kazMisc
KAZ_SRC = $(patsubst %, $(CPP_DIR)/%.cpp, $(KAZ_MOD))
KAZ_OBJ = $(patsubst %, $(OBJ_DIR)/%.o, $(KAZ_MOD))
KAZ_OUT = $(patsubst %, $(OUT_DIR)/%, $(KAZ_PRG))
## FLAGS ###############################
2022-04-15 11:11:44 +02:00
#DFLAGS = -O2 -DDISABLE_LOG
DFLAGS = -g -Wall
2021-05-15 17:49:15 +02:00
IFLAGS = $(DFLAGS) -MMD -I$(HPP_DIR) -std=c++11
2022-03-08 11:11:52 +01:00
LFLAGS = -L$(LIB_DIR) -lboost_system -lboost_program_options -lboost_filesystem -lcurl -lcrypto -lstdc++
2021-05-15 17:49:15 +02:00
CC = g++
## RULES ###############################
$(OBJ_DIR)/%.o: $(SRC_DIR)/*/%.cpp
$(CC) $< $(IFLAGS) -cpp -c -o $@
## ENTRIES #############################
2023-10-29 17:03:58 +01:00
all: init eMailShrinker doc
2021-05-15 17:49:15 +02:00
eMailShrinker: $(KAZ_OUT)
$(KAZ_OUT): $(KAZ_OBJ)
$(CC) $(KAZ_OBJ) $(IFLAGS) -cpp -L$(LIB_DIR) $(LFLAGS) -o $@
2022-11-26 21:55:05 +01:00
doc:
doxygen src/Doxyfile
2021-05-15 17:49:15 +02:00
init:
mkdir -p $(OUT_DIR) $(OBJ_DIR) $(LIB_DIR)
clean:
find . -type f '(' -name '#*' -o -name '*~' ')' -print -exec rm -f '{}' \;
wipe: clean
-rm -f src/*.tcpp src/*/*.tcpp
-rm -rf $(OUT_DIR) $(LIB_DIR) $(BLD_DIR)
## DEPENDS #############################
ALL_OUT = $(KAZ_PRG) $(JIR_PRG)
ALL_OBJ = $(KAZ_OBJ) $(JIR_OBJ)
DEPENDS = ${ALL_OUT:=.d} ${ALL_OBJ:.o=.d}
-include ${DEPENDS}
########################################