ARCH = x86 NEWLIB = ../x86/i586-metalsvm-elf32 MAKE = make CC = gcc CFLAGS = -m32 -O2 -nostdinc -Wall -fno-builtin -I$(NEWLIB)/include -I../../include -I../../arch/$(ARCH)/include #-fno-stack-protector LDFLAGS = -m32 -nostdlib -L$(NEWLIB)/lib # other implicit rules %.o : %.c $(CC) -c $(CFLAGS) -o $@ $< default: $(MAKE) hello all: $(MAKE) hello hello: hello.o $(CC) -T link.ld -o $@ $(LDFLAGS) $< clean: $(RM) *.o *~ depend: $(CC) -MM $(CFLAGS) hello.c > Makefile.dep -include Makefile.dep # DO NOT DELETE