metalsvm/newlib/examples/Makefile
2011-02-16 14:46:39 +01:00

29 lines
589 B
Makefile

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: all
all: hello test_fork
test_fork: test_fork.o
$(CC) -T link.ld -o $@ $(LDFLAGS) $<
hello: hello.o
$(CC) -T link.ld -o $@ $(LDFLAGS) $<
clean:
$(RM) hello test_fork *.o *~
depend:
$(CC) -MM $(CFLAGS) *.c > Makefile.dep
-include Makefile.dep
# DO NOT DELETE