For example: .if target(debug) FILES += $(DEBUG_FILES).endif The example above will append to the FILES variable if the debug target returns true.
Here's an example: .if $(DEBUG) == 1 $(CFLAGS) = -g. ifndef $(DEBUG_FLAGS) $(FLAGS) = $(DEBUG_FLAGS).