home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / palmos / pippy-0.6beta-src.tar.gz / pippy-0.6beta-src.tar / pippy-0.6beta-src / src / Palm / libc / Makefile < prev    next >
Makefile  |  2000-12-21  |  2KB  |  79 lines

  1. OBJS = \
  2.      strrchr.o vsprintf.o ctype.o setjmp.o \
  3.      bcopy.o memmove.o strchr.o strncat.o strspn.o \
  4.      memscan.o strcmp.o strncmp.o strstr.o \
  5.      memset.o strcpy.o strncpy.o strtok.o \
  6.      memcmp.o strnlen.o strtol.o \
  7.      memcpy.o strcat.o strlen.o strpbrk.o strtoul.o sscanf.o fopen.o\
  8.      malloc.o calloc.o realloc.o free.o fclose.o fwrite.o io.o mystdio.o
  9.  
  10. CC = m68k-palmos-coff-gcc
  11. AS = m68k-palmos-coff-as -mno-68881 -m68000 -l
  12.  
  13. #uncomment this if you want to build a gdb debuggable version
  14. #DEFINES = -DDEBUG
  15.  
  16. # To use segments, on the command line type:
  17. # make clean; make USE_SEGMENTS=-DUSE_SEGMENTS
  18. # The name of the segment is specified using SEG_NAME
  19. # as shown below - careful with the quotes!
  20. SEG_NAME = pseglibc
  21. Q_SEG_NAME = \"$(SEG_NAME)\"
  22. SEGMENT_LIST = pseglibc
  23.  
  24. USE_SEGMENTS=-DUSE_SEGMENTS
  25. INCLUDES = -I./include 
  26. CFLAGS = -O2 -Wall -g -fno-builtin $(DEFINES) $(INCLUDES) $(USE_SEGMENTS) -DQ_SEG_NAME=$(Q_SEG_NAME) -DSEG_NAME=$(SEG_NAME)
  27. ASFLAGS = -Wall -g -fno-builtin $(DEFINES) $(INCLUDES) $(USE_SEGMENTS) -DQ_SEG_NAME=$(Q_SEG_NAME) -DSEG_NAME=$(SEG_NAME)
  28.  
  29.  
  30. OBJRES = m68k-palmos-coff-obj-res
  31. AR = m68k-palmos-coff-ar
  32. RANLIB = m68k-palmos-coff-ranlib
  33.  
  34. BUILDPRC = build-prc
  35.  
  36. OURLIB = GLibc
  37. FULLNAME = "Python C Library"
  38. CREATOR = PyLc
  39.  
  40. all: $(OBJS)
  41.  
  42. libc.a: $(OBJS)
  43.     rm -f libc.a
  44.     $(AR) -r libc.a $(OBJS)
  45.     $(RANLIB) libc.a
  46.  
  47. $(OURLIB).exp: libc.a
  48.     m68k-palmos-coff-exportlist libc.a > $(OURLIB).exp
  49.  
  50. $(OURLIB)-hdr.s: $(OURLIB).exp
  51.     m68k-palmos-coff-glibhdrgen < $(OURLIB).exp > $(OURLIB)-hdr.s
  52.  
  53. $(OURLIB)-stub-a4.s: $(OURLIB).exp
  54.     m68k-palmos-coff-glibstubgen $(CREATOR) a4data < $(OURLIB).exp > $(OURLIB)-stub-a4.s
  55.  
  56.  
  57. $(OURLIB): $(OBJS) multiseg.ld $(OURLIB)-hdr.o multisegstub.o
  58.     $(CC) -shared $(CFLAGS) -T multiseg.ld -o $(OURLIB) $(OURLIB)-hdr.o \
  59.           $(OBJS) multisegstub.o -lNetSocket -lglibstub
  60.  
  61. multiseg.ld multisegstub.s:
  62.     m68k-palmos-coff-multisegstubgen -l $(SEGMENT_LIST)
  63.  
  64. the_grc: $(OURLIB)
  65.     $(OBJRES) -l $(OURLIB) $(SEGMENT_LIST)
  66.     touch the_grc
  67.  
  68. $(OURLIB).prc: $(OURLIB) $(OBJS) $(OURLIB)-hdr.o the_grc
  69.     $(BUILDPRC) -l $(OURLIB).prc $(FULLNAME) $(CREATOR) *.$(OURLIB).grc
  70.  
  71. add2lib: $(OBJS)
  72.     $(AR) cr $(LIBRARY) $(OBJS)
  73.     touch add2lib
  74.  
  75. clean:
  76.     rm -f *.o $(OURLIB)-hdr* $(OURLIB) *.[pg]rc
  77.     rm -f $(OURLIB)-stub* $(OURLIB)-mwstub* errs *.ld
  78.  
  79.