metalsvm/newlib/examples/Makefile

48 lines
1.1 KiB
Makefile
Raw Normal View History

ARCH = x86
NEWLIB = ../x86/i586-metalsvm-elf32
MAKE = make
STRIP_DEBUG = --strip-debug
KEEP_DEBUG = --only-keep-debug
2011-04-19 20:18:38 +02:00
LDFLAGS =
# other implicit rules
%.o : %.c
$(CC_FOR_TARGET) -c $(CFLAGS) -o $@ $<
2011-02-16 14:46:39 +01:00
default: all
2011-05-24 23:37:40 +02:00
all: hello tests jacobi mshell
2011-04-19 20:18:38 +02:00
jacobi: jacobi.o
$(CC_FOR_TARGET) -T link.ld -o $@ $(LDFLAGS) $< -lm
$(OBJCOPY_FOR_TARGET) $(KEEP_DEBUG) $@ $@.sym
$(OBJCOPY_FOR_TARGET) $(STRIP_DEBUG) $@
chmod a-x $@.sym
2011-02-16 14:46:39 +01:00
2011-02-28 12:22:49 +01:00
tests: tests.o
$(CC_FOR_TARGET) -T link.ld -o $@ $(LDFLAGS) $<
$(OBJCOPY_FOR_TARGET) $(KEEP_DEBUG) $@ $@.sym
$(OBJCOPY_FOR_TARGET) $(STRIP_DEBUG) $@
chmod a-x $@.sym
hello: hello.o
$(CC_FOR_TARGET) -T link.ld -o $@ $(LDFLAGS) $<
$(OBJCOPY_FOR_TARGET) $(KEEP_DEBUG) $@ $@.sym
$(OBJCOPY_FOR_TARGET) $(STRIP_DEBUG) $@
chmod a-x $@.sym
mshell: mshell.o
$(CC_FOR_TARGET) -T link.ld -o $@ $(LDFLAGS) $<
$(OBJCOPY_FOR_TARGET) $(KEEP_DEBUG) $@ $@.sym
$(OBJCOPY_FOR_TARGET) $(STRIP_DEBUG) $@
chmod a-x $@.sym
2011-05-23 13:47:05 +02:00
clean:
$(RM) hello hangman jacobi mshell tests *.sym *.o *~
depend:
$(CC_FOR_TARGET) -MM $(CFLAGS) *.c > Makefile.dep
-include Makefile.dep
# DO NOT DELETE