swh:1:snp:9dcf3ab72851691ef27e40da9b2a50243c1bdd22
Raw File
Tip revision: 5f23fb0b6e1d50d996ac54daaa7e637e5d8decaf authored by Software Heritage on 05 May 2020, 00:00:00 UTC
ipol: Deposit 1363 in collection ipol
Tip revision: 5f23fb0
Makefile

#
# Makefile
# 
# Copyright (C) 2019, Tristan Dagobert, CMLA, École Normale Supérieure Paris-Saclay.
# 
# This software is a computer program.[describe
# functionalities and technical features of your software].
# 
# This software is governed by the CeCILL-C 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-C
# 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-C license and that you accept its terms.
# 
#
    
# PROGRAM
EXE = stratus.exe

# SOURCES
SRC   := $(shell ls *.c)

# OBJETS
OBJCPP	= $(SRCPP:.cpp=.o)
OBJC    = $(SRC:.c=.o)

# image libraries
DIR_IMAGE =
LIB_IMAGE = -lpng -ltiff -ljpeg
INC_IMAGE = 

# libraries
DIR_LIBS = 
INC_LIBS = 

ifeq ($(MYDEBUG),1)
	# For debugging mode
	OPTS_C  = -ggdb -Wall -Wextra -Werror -fsanitize=address
	# For debugging mode
	LIBS = -lm -lz $(LIB_IMAGE) -fsanitize=address
else
	# For production mode
	OPTS_C  = -O3 -Wall -Wextra 
	# For production mode
	LIBS = -lm -lz $(LIB_IMAGE)

endif

default :
	@echo "Usage : make (exe | test | clean);"

# compilation of C source code
%.o	: %.c
	@echo "Compilation of C files…"
	$(CC) $(OPTS_C) -fPIC -c $< -o $@

# linkage of object code
$(EXE)	: $(OBJC)
#	$(CC) $^ $(DIR_LIBS) $(LIBS) -ffunction-sections -fdata-sections -Wl,--gc-sections -Wl,--print-gc-sections -o $@ 
	$(CC) $^ $(DIR_LIBS) $(LIBS) -o $@ 

$(SLIB) : 
	$(CC) -shared -o $@ $^ $(DIR_LIBS) $(LIBS)  


exe	: $(EXE)
	@echo "stratus.exe is built"


pfx:=$(shell ls test_data/*)
antedir := test_data
neodir := output_data
neo := $(subst $(antedir),$(neodir),$(pfx))

test : exe
	@echo $(neo)
	@mkdir $(neodir)
	./$(EXE) --im-pfx-map $(neo) --im-sift $(antedir)/* --im-lumi $(antedir)/* --opt-alpha 0.2;

# cleaning
clean	:
	$(RM) $(OBJC) $(EXE) *~
	$(RM) -r $(neodir)


back to top