Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit e04751b9 authored by Mikaël Salson's avatar Mikaël Salson
Browse files

Makefile: The rule must specify the output directory

A rule name is supposed to be the output file: if it doesn't exist the rule is relaunched.
To prevent relaunching every time compilation of vidjil and align.cgi we must provide
the output directory in the rule name so that Make knows where it should look for the output file.

By doing so the compilation will be relaunched only when the output file is older
than the files it depends on. We must also provide the library as a dependance for the
file to be rebuilt when the library changes.
parent ee997b92
......@@ -28,8 +28,11 @@ EXEC=vidjil
MAINCORE=$(wildcard *.cpp)
LIBCORE=core/vidjil.a lib/lib.a
CREATE_VERSION_GIT_H := $(shell test -x ./create-git-version-h.sh && ./create-git-version-h.sh)
......@@ -66,10 +69,10 @@ cleanspaced:
align.cgi: cgi/align.o
$(ALIGN_CGI): cgi/align.o $(LIBCORE)
mkdir -p $(CGIDIR)
make -C core OPTIM="$(OPTIM)"
$(CC) -o $(CGIDIR)/align.cgi cgi/align.o $(LIBCORE) $(LDFLAGS) $(LDLIBS) $(CXXFLAGS)
$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS) $(CXXFLAGS)
all: $(EXEC)
......@@ -78,10 +81,10 @@ debug:
make clean
make DEBUG="-ggdb"
$(EXEC): %: %.o
make -C core OPTIM="$(OPTIM)"
make -C lib OPTIM="$(OPTIM)"
$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS) $(CXXFLAGS)
make -C core $@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment