Guest User

Untitled

a guest
Dec 12th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. SRCS = $(shell find . -name '*.c')
  2. OBJS = $(addsuffix .o,$(basename $(SRCS)))
  3.  
  4. CC = i686-elf-gcc
  5. LD = i686-elf-ld
  6.  
  7. ASFLAGS = -m32
  8. CFLAGS = -m32 -Wall -g -fno-stack-protector -nostdinc
  9. LDFLAGS = -melf_i386 -Tlinker.ld
  10.  
  11. test.bin: $(OBJS)
  12. $(LD) $(LDFLAGS) -o $@ $^
  13.  
  14. %.o: %.c
  15. $(CC) $(CFLAGS) -c -o $@ $^
  16.  
  17. clean:
  18. rm $(OBJS)
  19.  
  20. .PHONY: clean
Advertisement
Add Comment
Please, Sign In to add comment