Professional Documents
Culture Documents
Makefile Trong Linux
Makefile Trong Linux
Variable Description
AR Archive-maintenance programs; default value = ar
AS Program to do assembly; default value = as
CC Program for compiling C programs; default value = cc
CPP C Preprocessor program; default value = cpp
RM Program to remove files; default value = “rm -f”
ARFLAGS Flags for the archive-maintenance program; default = rv
ASFLAGS Flags for the assembler program; no default
CFLAGS Flags for the C compiler; no default
CPPFLAGS Flags for the C preprocessor; no default
LDFLAGS Flags for the linker (ld); no default
V. Makefile trong hệ thống Linux
• Một số khái niệm khác:
– PHONY target
– Biến
– Biến tự động
– Biến xác định trước và cờ
– Biến môi trường
V. Makefile trong hệ thống Linux
• Debugging Make :
– Sử dụng tùy chọn –d cho make in ra nhiều thông
tin gỡ rối ngoài các lệnh đã thực hiện
V. Makefile trong hệ thống Linux
• 4/ Ví dụ:
V. Makefile trong hệ thống Linux
• Nguồn :
https://www.gnu.org/software/make/manual/
make.html