Abandon gnatmake and generate elaboration code

This commit is contained in:
Alexander Senier
2019-01-30 16:57:05 +01:00
committed by Norman Feske
parent 253d6b0b92
commit 80a607ee0c
4 changed files with 26 additions and 11 deletions

View File

@@ -101,6 +101,23 @@ message:
FORCE:
$(SRC_ADA:.adb=.o): FORCE
#
# Run binder if Ada sources are included in the build
#
ifneq ($(SRC_ADS)$(SRC_ADB),)
CUSTOM_BINDER_FLAGS ?= -n -we
OBJECTS += b~$(TARGET).o
ALIS := $(addsuffix .ali, $(basename $(SRC_ADS) $(SRC_ADB)))
BINDER_SEARCH_DIRS = $(addprefix -I$(BUILD_BASE_DIR)/var/libcache/, $(LIBS))
BINDER_SRC := b~$(TARGET).ads b~$(TARGET).adb
$(BINDER_SRC): $(ALIS)
$(VERBOSE)$(GNATBIND) $(CUSTOM_BINDER_FLAGS) $(BINDER_SEARCH_DIRS) $(INCLUDES) --RTS=$(ADA_RTS) -o $@ $^
endif
#
# Use CXX for linking
#
@@ -215,7 +232,7 @@ endif
clean_prg_objects:
$(MSG_CLEAN)$(PRG_REL_DIR)
$(VERBOSE)$(RM) -f $(OBJECTS) $(OBJECTS:.o=.d) $(TARGET) $(TARGET).stripped
$(VERBOSE)$(RM) -f $(OBJECTS) $(OBJECTS:.o=.d) $(TARGET) $(TARGET).stripped $(BINDER_SRC)
$(VERBOSE)$(RM) -f *.d *.i *.ii *.s *.ali *.lib.so
clean: clean_prg_objects