metalsvm/newlib/examples/Makefile

28 lines
486 B
Makefile
Raw Normal View History

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