38d30a3e42
* GNUmakefile (OUT,QUIET,SUBDIRS): New variables. include make/common.make * .gitignore: Remove toplevel targets. * build-aux/compile-all.scm: Import from GNU Guix. * configure (gulp-pipe): Check exit status. Actually test for CC, CC32. * make/bin.make: New file. * make/check.make: New file. * make/clean.make: New file. * make/common.make: New file. * make/compile.make: New file. * make/guile.make: New file. * make/mescc-guile.make: New file. * make/mescc-mes.make: New file. * make/reset.make: New file. * lib/mlibc.c: Rename from top. * lib/start.c: Rename from top. * module/module.make: New file. * scaffold/scaffold.make: New file. * scripts/scripts.make: New file. * src/mes.c: Rename from top. * src/src.make: New file. * src/mes.c: Rename from top. * src/gc..c: Rename from top. * src/lib.c: Rename from top. * src/posix.c: Rename from top. * src/reader.c: Rename from top. * src/vector.c: Rename from top. * tests/tests.make: New file.
24 lines
617 B
Makefile
24 lines
617 B
Makefile
O_FILES := $(C_FILES:%.c=$(OUT)/%.$(CROSS)o)
|
|
D_FILES := $(O_FILES:%o=%d)
|
|
|
|
ifneq ($(DEBUG),)
|
|
$(info TARGET=$(TARGET))
|
|
$(info C_FILES=$(C_FILES))
|
|
$(info O_FILES=$(O_FILES))
|
|
$(info O_FILES=$(D_FILES))
|
|
endif
|
|
|
|
CLEAN+=$(O_FILES) $(OUT)/$(TARGET)
|
|
DIST-CLEAN+=$(D_FILES)
|
|
|
|
$(OUT)/$(TARGET): ld:=$(CROSS)LD
|
|
$(OUT)/$(TARGET): LD:=$(CROSS)$(LD)
|
|
$(OUT)/$(TARGET): CC:=$(CROSS)$(CC)
|
|
$(OUT)/$(TARGET): LDFLAGS:=$(LDFLAGS) $(LD_FLAGS) $(LINK)
|
|
$(OUT)/$(TARGET): O_FILES:=$(O_FILES)
|
|
$(OUT)/$(TARGET): $(O_FILES)
|
|
@echo " $(ld) $(notdir $^) -> $(notdir $@)"
|
|
$(QUIET)$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
|
|
|
|
include make/compile.make
|