Skip to content

Instantly share code, notes, and snippets.

@StefanoBelli
Created October 6, 2018 23:15
Show Gist options
  • Save StefanoBelli/85abd7a5573a1a9e01c7e74363664775 to your computer and use it in GitHub Desktop.
Save StefanoBelli/85abd7a5573a1a9e01c7e74363664775 to your computer and use it in GitHub Desktop.
SHELL=/bin/sh
AS=as
LD=ld
OBJS=obj.o obj1.o
OUT=executable
all:$(OBJS)
@for OBJ in $(OBJS); do echo -e "\tLD $$OBJ"; done
@$(LD) $(OBJS) -o $(OUT) && echo -e '\tOUT $(OUT)'
$(OBJS): %.o: %.S
@echo -e '\tAS $<'
@$(AS) $< -o $@
clean:
rm $(OBJS)
.PHONY: all, clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment