Makefile 504 B

12345678910111213141516171819202122232425262728
  1. LD=ld
  2. #LDFLAGS=-melf_i386
  3. LDFLAGS=
  4. ASM=yasm
  5. #ASMFLAGS=-f elf32 -g DWARF2
  6. ASMFLAGS=-f elf64 -g DWARF2
  7. #SOURCES=exit_syscall.asm cat.asm cat64.asm hex0_nocomments.asm hex0.asm
  8. SOURCES=cat64.asm hex0.asm hex0glo.asm hex0globuf.asm hex2.asm strcmp.asm hex0globuflbl.asm \
  9. words.asm
  10. OBJECTS=$(SOURCES:.asm=.o)
  11. BINARIES=$(OBJECTS:.o=.bin)
  12. .PHONY: all
  13. all: $(BINARIES)
  14. .PHONY: clean
  15. clean:
  16. rm -f $(OBJECTS)
  17. rm -f $(BINARIES)
  18. %.o: %.asm
  19. $(ASM) $(ASMFLAGS) $< -o $@
  20. %.bin: %.o
  21. $(LD) $(LDFLAGS) $< -o $@