metalsvm/newlib/examples/Makefile
2011-08-10 08:22:23 +02:00

53 lines
1.3 KiB
Makefile

ARCH = x86
NEWLIB = ../x86/i586-metalsvm-elf32
MAKE = make
STRIP_DEBUG = --strip-debug
KEEP_DEBUG = --only-keep-debug
LDFLAGS =
# other implicit rules
%.o : %.c
$(CC_FOR_TARGET) -c $(CFLAGS) -o $@ $<
default: all
all: hello tests jacobi server client
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
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
server: server.o
$(CC_FOR_TARGET) -T link.ld -o $@ $(LDFLAGS) $< -lsocket
$(OBJCOPY_FOR_TARGET) $(KEEP_DEBUG) $@ $@.sym
$(OBJCOPY_FOR_TARGET) $(STRIP_DEBUG) $@
chmod a-x $@.sym
client: client.o
$(CC_FOR_TARGET) -T link.ld -o $@ $(LDFLAGS) $< -lsocket
$(OBJCOPY_FOR_TARGET) $(KEEP_DEBUG) $@ $@.sym
$(OBJCOPY_FOR_TARGET) $(STRIP_DEBUG) $@
chmod a-x $@.sym
clean:
$(RM) hello tests server client *.sym *.o *~
depend:
$(CC_FOR_TARGET) -MM $(CFLAGS) *.c > Makefile.dep
-include Makefile.dep
# DO NOT DELETE