repositories
/
TD_C.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TP 11 exo1: deconstify where appropriate
[TD_C.git]
/
TP_13
/
exo1
/
Makefile
diff --git
a/TP_13/exo1/Makefile
b/TP_13/exo1/Makefile
index 65b7fdc23894fa3e45df161cb73fe902c286175a..791c7d48cfe295a9f0efa66f5ce2b9df1f7791fa 100644
(file)
--- a/
TP_13/exo1/Makefile
+++ b/
TP_13/exo1/Makefile
@@
-1,13
+1,19
@@
# Sample Makefile to build simple project.
#
# This Makefile expect all source files (.c) to be at the same level, in the
# Sample Makefile to build simple project.
#
# This Makefile expect all source files (.c) to be at the same level, in the
-# current working directory.
+# $(SRC_PATH) directory.
+#
+# This Makefile expect all embedded library source files (.c) to be at the same level, in the
+# $(LIBRARY_PATH) directory.
#
# It will automatically generate dependencies, compile all files, and produce a
#
# It will automatically generate dependencies, compile all files, and produce a
-# binary using the provided name.
+# binary using the provided name
linked against the library if necessary
.
#
# Set BINARY_NAME to the name of the binary file to build.
#
# 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
#
# Automatic dependencies code from:
# http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/#tldr
@@
-43,7
+49,7
@@
STRIP_FLAG = -s
OPTI_FLAG = -O3
endif
OPTI_FLAG = -O3
endif
-# Puting header files in the source directory is not the purpose of this INCLUDES variable
+# Put
t
ing 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)
INCLUDES := $(INCLUDES) -I$(SRC_PATH) -I$(LIBRARY_PATH)
CFLAGS := $(CFLAGS) $(WARN_FLAGS) $(STD_FLAG) $(OPTI_FLAG) $(DEBUG_FLAG) $(INCLUDES)
LIBCFLAGS := -fPIC $(CFLAGS)