metalsvm/libgloss/Makefile
stefan a6a9617775 - add the libc "newlib" and their support into MetalSVM
- programs could be load as module by the bootloader Grub



git-svn-id: http://svn.lfbs.rwth-aachen.de/svn/scc/trunk/MetalSVM@95 315a16e6-25f9-4109-90ae-ca3045a26c18
2010-08-17 09:59:29 +00:00

34 lines
854 B
Makefile

C_source = init.c chown.c environ.c execve.c fork.c fstat.c getpid.c gettod.c isatty.c link.c sbrk.c stat.c symlink.c times.c unlink.c wait.c kill.c lseek.c open.c close.c write.c read.c _exit.c errno.c
ASM_source =
LIBNAME = libgloss.a
INC = -I../newlib/current/include
OBJS += $(patsubst %.c, %.o, $(filter %.c, $(C_source)))
OBJS += $(patsubst %.asm, %.o, $(filter %.asm, $(ASM_source)))
# other implicit rules
%.o : %.c
$(CC) -c $(CFLAGS) $(INC) -o $@ $<
%.o : %.asm
$(ASM) $(ASMFLAGS) -o $@ $<
default: $(OBJS)
$(MAKE) $(LIBNAME)
all:
$(MAKE) $(LIBNAME)
$(LIBNAME): $(OBJS) crt0.o
$(AR) $(ARFLAGS) $(LIBNAME) $(OBJS)
cp $(LIBNAME) ../newlib/current/lib
cp crt0.o ../newlib/current/lib/metalsvm-crt0.o
clean:
$(RM) *.o *~ $(LIBNAME)
depend:
$(CC) -MM $(CFLAGS) $(C_source) > Makefile.dep
-include Makefile.dep
# DO NOT DELETE