diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2011-01-24 06:20:27 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2011-01-24 06:29:12 +0100 |
commit | 6c17623845a0d42285d77bdd8bbf177badf5b9f6 (patch) | |
tree | 3db8b0fa214264ac089d16bbcf4a3c533b8d7629 /target-rules.mk | |
parent | e9b4b3d26eae1a07c9c2d948e51250792beea075 (diff) |
Shuffled a few configuration items around, and added a barebone demo source code.
Diffstat (limited to 'target-rules.mk')
-rw-r--r-- | target-rules.mk | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/target-rules.mk b/target-rules.mk index dc5a047..acb398c 100644 --- a/target-rules.mk +++ b/target-rules.mk @@ -8,6 +8,20 @@ TARGET_OBJS = $(addsuffix .o, $(basename $(TARGET_SRCS))) +ifneq ($(TARGET),) +TARGET_ELF = $(addsuffix .elf, $(basename $(TARGET))) +TARGET_BIN = $(addsuffix .bin, $(basename $(TARGET))) +TARGET_OBJS += $(addsuffix .o, $(basename $(TARGET))) +endif + +$(TARGET_ELF): $(TARGET_OBJS) + $(E) [TL] Linking $@ + $(Q)$(TARGET_LD) -o $@ $^ -T$(LDSCRIPT) $(LIBS) + +$(TARGET_BIN): $(TARGET_ELF) + $(E) [TB] Creating $@ + $(Q)$(TARGET_OBJDUMP) $< -O binary $@ + $(TARGET_LIB): $(TARGET_OBJS) $(E) [TLIB] Creating $@ $(Q)$(TARGET_AR) rcs $@ $^ @@ -15,4 +29,4 @@ $(TARGET_LIB): $(TARGET_OBJS) .PHONY: clean-generic clean-generic: - rm -f $(TARGET_LIB) $(TARGET_OBJS) + rm -f $(TARGET_LIB) $(TARGET_OBJS) $(TARGET) $(TARGET_ELF) $(TARGET_BIN) |