TP 13 exo1: Fix a typo in the Makefile
[TD_C.git] / TP_13 / exo1 / Makefile
index 830835782ec244e8cf50fd31445bce29eea3f149..20746ac802aae220d185dd15b2d0a726549b546c 100644 (file)
@@ -7,7 +7,10 @@
 # binary using the provided name.
 #
 # Set BINARY_NAME to the name of the binary file to build.
-# Set BUILD_TYPE to either debug or release
+# Set LIBRARY_NAME to the name of the library file to build.
+# The default path for the library code and object is lib.
+# By default the linker will look for $(BINARY_NAME) library name.
+# Set BUILD_TYPE to either debug or release.
 #
 # Automatic dependencies code from:
 # http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/#tldr
@@ -43,6 +46,7 @@ STRIP_FLAG = -s
 OPTI_FLAG = -O3
 endif
 
+# Putting header files in the source directory is not the purpose of this INCLUDES variable
 INCLUDES := $(INCLUDES) -I$(SRC_PATH) -I$(LIBRARY_PATH)
 CFLAGS := $(CFLAGS) $(WARN_FLAGS) $(STD_FLAG) $(OPTI_FLAG) $(DEBUG_FLAG) $(INCLUDES)
 LIBCFLAGS := -fPIC $(CFLAGS)
@@ -84,10 +88,6 @@ $(BINARY_NAME).static: $(OBJS) $(LIBRARY_PATH)/$(LIBRARY_NAME).a
        @echo "[LD ] $@"
        @$(LD) $(CFLAGS) $(STATICLIBLDFLAGS) $^ $(LDLIBS) -o $@
 
-#$(BINARY_NAME).staticlocal: $(OBJS) $(LIBRARY_PATH)/$(LIBRARY_NAME).a
-#      @echo "[LD ] $@"
-#      @$(LD) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
-
 $(BINARY_NAME).dynamic: $(OBJS) $(LIBRARY_PATH)/$(LIBRARY_NAME).so
        @echo "[LD ] $@"
        @$(LD) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@