From: Jérôme Benoit Date: Tue, 7 Mar 2017 17:47:05 +0000 (+0100) Subject: TP11: Rename the static binary target to express that it's not X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f1294ffe51b4cee659a10f464966ce9e3c0c4fa6;p=TD_C.git TP11: Rename the static binary target to express that it's not statically linked binary but linked only against the embedded libraries Signed-off-by: Jérôme Benoit --- diff --git a/TP_11/exo1/Makefile b/TP_11/exo1/Makefile index 634334e..adaddf0 100644 --- a/TP_11/exo1/Makefile +++ b/TP_11/exo1/Makefile @@ -21,7 +21,7 @@ BUILD_TYPE=debug # DO NOT CHANGE STUFF BEYOND THIS LINE # ==================================== -all: $(BINARY_NAME) $(BINARY_NAME).dynamic $(BINARY_NAME).static +all: $(BINARY_NAME) $(BINARY_NAME).dynamic $(BINARY_NAME).staticlocal CC=gcc LD=gcc @@ -72,7 +72,7 @@ $(BINARY_NAME): $(OBJS) @$(LD) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@ LOCALLDLIBS=-L. -ltpC -$(BINARY_NAME).static: $(OBJDIR)/$(BINARY_NAME).o $(LIBRARY_NAME).a +$(BINARY_NAME).staticlocal: $(OBJDIR)/$(BINARY_NAME).o $(LIBRARY_NAME).a @echo "[LD ] $@" @$(LD) $(CFLAGS) $(LDFLAGS) $^ $(LOCALLDLIBS) $(LDLIBS) -o $@ @@ -95,7 +95,7 @@ clean: @echo "[CLN]" -@rm -r $(BUILDDIR) -@rm $(BINARY_NAME) - -@rm $(BINARY_NAME).static + -@rm $(BINARY_NAME).staticlocal -@rm $(BINARY_NAME).dynamic -@rm $(LIBRARY_NAME).so -@rm $(LIBRARY_NAME).a diff --git a/TP_11/exo2/Makefile b/TP_11/exo2/Makefile index aded269..50191de 100644 --- a/TP_11/exo2/Makefile +++ b/TP_11/exo2/Makefile @@ -21,7 +21,7 @@ BUILD_TYPE=debug # DO NOT CHANGE STUFF BEYOND THIS LINE # ==================================== -all: $(BINARY_NAME) $(BINARY_NAME).dynamic $(BINARY_NAME).static +all: $(BINARY_NAME) $(BINARY_NAME).dynamic $(BINARY_NAME).staticlocal CC=gcc LD=gcc @@ -72,7 +72,7 @@ $(BINARY_NAME): $(OBJS) @$(LD) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@ LOCALLDLIBS=-L. -ltpC -$(BINARY_NAME).static: $(OBJDIR)/$(BINARY_NAME).o $(LIBRARY_NAME).a +$(BINARY_NAME).staticlocal: $(OBJDIR)/$(BINARY_NAME).o $(LIBRARY_NAME).a @echo "[LD ] $@" @$(LD) $(CFLAGS) $(LDFLAGS) $^ $(LOCALLDLIBS) $(LDLIBS) -o $@ @@ -95,7 +95,7 @@ clean: @echo "[CLN]" -@rm -r $(BUILDDIR) -@rm $(BINARY_NAME) - -@rm $(BINARY_NAME).static + -@rm $(BINARY_NAME).staticlocal -@rm $(BINARY_NAME).dynamic -@rm $(LIBRARY_NAME).so -@rm $(LIBRARY_NAME).a