Commit c9aca3e0 authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

init environment in every recipe

parent 06f63918
SHELL= @SHELL@
BUILD_ENV= @BUILD_ENV_MAKE@
CC= @CC@
CFLAGS= @CFLAGS@
CPPFLAGS= @CPPFLAGS@
......@@ -32,26 +35,26 @@ dir_files:= $(sort $(dir_files))
all: $(exec_files)
mostlyclean:
rm -f $(exec_files) $(obj_files)
$(BUILD_ENV) rm -f $(exec_files) $(obj_files)
clean: mostlyclean
rm -f $(dir_files)
$(BUILD_ENV) rm -f $(dir_files)
distclean: clean
rm -f config.log config.status Makefile
$(BUILD_ENV) rm -f config.log config.status Makefile
install: $(exec_files)
$(INSTALL) -d @bindir@ && $(INSTALL) $^ @bindir@
$(BUILD_ENV) $(INSTALL) -d @bindir@ && $(INSTALL) $^ @bindir@
src/main: $(obj_files)
$(exec_files):| $(dir_files)
$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $+ $(LIBS)
$(BUILD_ENV) $(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $+ $(LIBS)
%.@OBJEXT@: %.c | $(dir_files)
$(CC) -o $@ -c $(CFLAGS) $(CPPFLAGS) $<
$(BUILD_ENV) $(CC) -o $@ -c $(CFLAGS) $(CPPFLAGS) $<
.PRECIOUS: $(dir_files)
%/.dirstamp:
@MKDIR_P@ $(@D) && touch $@
$(BUILD_ENV) @MKDIR_P@ $(@D) && touch $@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment