我是使用 makefile 的新手,我有一些 makefile。其中一个有这些陈述,我试图理解,但我不能。
这个makefile在做什么?
# debugging support
ifeq ($(DEBUG), true)
CFLAGS+=-DDEBUG -g
endif
ifeq ($(DEBUG), gdb)
CFLAGS+=-g
endif
ifeq ($(PROFILING), true)
CFLAGS+=-p
endif
# symbolic names debugging
ifeq ($(DEBUG_NAMES), true)
CFLAGS+=-DDEBUG_NAMES
endif
# architecture TODO: add others
ifeq ($(ARCH), unix)
CFLAGS+=-DUNIX
endif
# TODO: GC settings
ifeq ($(HEAP), malloc)
CFLAGS+=-DHEAP_MALLOC
endif
ifeq ($(STACK), malloc)
CFLAGS+=-DSTACK_MALLOC
endif
# class loading method
ifeq ($(CLASS), external)
CFLAGS+=-DEXTERNAL_TUK
endif
# monitor allocation
ifeq ($(MONITORS), ondemand)
CFLAGS+=-DON_DEMAND_MONITORS
endif
阿姆里