home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / mntlib32.zoo / sozobon / makefile < prev    next >
Makefile  |  1993-06-17  |  5KB  |  149 lines

  1. # Makefile for hacked MiNTlib for Heat-n-Serve/Sozobon C, version 1.33i
  2. # and above.  This makefile works with the make provided with 1.40 and
  3. # up, and less well with the make provided with 1.33i
  4.  
  5. # Where to install libraries.
  6. # LIBDIR = c:\sozobon\lib
  7. LIBDIR = u:\lib
  8.  
  9. # You might want any or all of these; Sozobon's make predefines most of them.
  10. AR = ar
  11. #CP = cp
  12. #RM = rm -f
  13. MAKE = make
  14.  
  15. # A trick to build a v1.40-compatible library with a v2.00 or higher
  16. # compiler -- either uncomment this line or build the target
  17. # "short_names".  This isn't necessary unless you're building an old
  18. # library with a new compiler (and hopefully by the next release it
  19. # won't be necessary at all).
  20. #SHORTNAMES = -8
  21. AFLAGS = $(SHORTNAMES)
  22.  
  23.  
  24. # To build the .cpp files, you'll need my stand-alone preprocessor,
  25. # which should be available where you got this archive.
  26. CPP = cpp
  27. CPPFLAGS = -P -Wno-bad-chars -D__SOZOBON__ -D__MSHORT__
  28.  
  29. # 1.33i's top apparently takes about 30 minutes on doprnt.c; if you don't
  30. # want to wait that long, use the alternate definition of NOOPT. 
  31. # Unfortunately, there is an optimizer bug in 1.40 that bites here; if
  32. # you're using that version, you must use the non-optimizing version.
  33. CFLAGS = -O -D__NO_FLOAT__ -DNDEBUG $(SHORTNAMES)
  34. #NOOPT = -D__NO_FLOAT__ -DNDEBUG $(SHORTNAMES)    # without debugging
  35. NOOPT = $(CFLAGS)                # with debugging
  36.  
  37. # If you prefer more "standard" Unix-like names for your library files, use
  38. # the alternate definitions of CRT0 and LIBC -- assuming, of course, that
  39. # your cc has been modified to recognize those names!
  40. # CRT0 = crt0.o
  41. # LIBC = libc.a
  42. CRT0 = dstart.o
  43. LIBC = dlibs.a
  44. LIBS = $(CRT0) $(LIBC) libtermcap.a
  45.  
  46. all : $(LIBS)
  47.  
  48. # These are in alphabetical order to make it easy to find one.
  49. OBJECTS = \
  50.     abort.o abs.o access.o alarm.o alglobal.o alloca.o alphasor.o \
  51.     atexit.o atol.o \
  52.     bcmp.o bcopy.o binmode.o bsearch.o bzero.o \
  53.     calloc.o chdir.o chmod.o clock.o close.o console.o crtinit.o \
  54.     ctermid.o ctime.o ctype.o \
  55.     defmode.o difftime.o dirent.o doprnt.o dup.o \
  56.     eprintf.o exec.o execp.o\
  57.     fclose.o fcntl.o fdopen.o fflush.o fgetc.o fgets.o filbuf.o \
  58.     findfile.o fopen.o fopenp.o fork.o fprintf.o fputc.o fputs.o \
  59.     fread.o frwbin.o fscanf.o fseek.o fsetpos.o ftw.o fungetc.o \
  60.     fwrite.o \
  61.     getbuf.o getcwd.o getdtabl.o getenv.o getgroup.o gethostn.o \
  62.     getlogin.o getopt.o getpages.o getpass.o getpid.o getpw.o \
  63.     getrusag.o gets.o getuid.o getw.o grp.o \
  64.     heapbase.o \
  65.     ic.o ident.o ig.o il.o inistack.o initsig.o ioctl.o ip.o \
  66.     isatty.o iw.o \
  67.     kill.o killpg.o \
  68.     linea.o link.o lmalloc.o localtim.o lockf.o lseek.o ltoa.o \
  69.     main.o malloc.o memccpy.o memchr.o memcmp.o mkdir.o mknod.o \
  70.     mktemp.o \
  71.     nice.o \
  72.     obstack.o open.o osbind.o \
  73.     pause.o perror.o pgrp.o pipe.o popen.o psignal.o putenv.o \
  74.     qsort.o \
  75.     raise.o rand.o random.o read.o realloc.o regexp.o regsup.o \
  76.     rename.o rmdir.o \
  77.     sbrk.o scandir.o scanf.o select.o setbuf.o setjmp.o setlocal.o \
  78.     setrlimi.o setvbuf.o sgtty.o sigactio.o sigblock.o siglist.o \
  79.     signal.o sleep.o sozolong.o sozulong.o spawn.o spawnve.o \
  80.     spawnvp.o sprintf.o sscanf.o stat.o statfs.o stksiz.o strcat.o \
  81.     strchr.o strcmp.o strcoll.o strcpy.o strcspn.o strdup.o \
  82.     strerror.o strftime.o stricmp.o strlen.o strlwr.o strncat.o \
  83.     strncmp.o strncpy.o strnicmp.o strpbrk.o strrchr.o strrev.o \
  84.     strspn.o strstr.o strtok.o strtol.o strtoul.o strupr.o symlink.o \
  85.     sysconf.o system.o sysvar.o \
  86.     textio.o thread.o time.o timeoday.o times.o tmpfile.o tmpnam.o \
  87.     toxxx.o ttyname.o \
  88.     uname.o unlink.o unx2dos.o utime.o utmp.o \
  89.     vfork.o \
  90.     wait.o wait3.o waitpid.o write.o wtmp.o
  91.  
  92. # Rule to handle .cpp files
  93. .SUFFIXES: .cpp
  94.  
  95. .cpp.s:
  96.     $(CPP) $(CPPFLAGS) $< $*.i
  97.     mit2mot $*.i
  98.     $(RM) $*.i
  99.  
  100. .cpp.o:
  101.     $(CPP) $(CPPFLAGS) $< $*.i
  102.     mit2mot $*.i
  103.     $(RM) $*.i
  104.     $(AS) $(AFLAGS) $*.s
  105.  
  106. # Make sure the targets get built if necessary
  107. alloca.o: alloca.cpp
  108. bcopy.o: bcopy.cpp
  109. bzero.o: bzero.cpp
  110. crt0.o: crt0.cpp
  111. osbind.o: osbind.cpp
  112. setjmp.o: setjmp.cpp
  113. vfork.o: vfork.cpp
  114.  
  115. # If you're using 1.33i's make or ar, this command will fail spectacularly
  116. # for the first build; you'll have to build it by hand, a few files
  117. # at a time.  After that, if you only change a few files at a time,
  118. # you shouldn't have problems.  Later versions are compiled with ARGV
  119. # and have no problems.
  120. $(LIBC) : $(OBJECTS)
  121.     $(AR) rv $@ $?
  122.  
  123. doprnt.o: doprnt.c
  124.     $(CC) $(NOOPT) -c $?
  125.  
  126. libtermcap.a : termcap.o
  127.     $(AR) rv $@ $?
  128.  
  129. # this is ugly, but I can't think of a way around it without risking the TOS
  130. # "copy file to itself" bug.  If you have CRT0 = crt0.o, this rule will
  131. # never be used anyway.
  132. dstart.o : crt0.o
  133.     $(CP) $? $@
  134.  
  135. # The trick described above -- force v2.00+ compilers to generate short
  136. # identifiers compatible with v1.40 and before.
  137. short_names:
  138.     $(MAKE) SHORTNAMES=-8
  139. clean :
  140.     $(RM) *.o
  141.  
  142. realclean : clean
  143.     $(RM) $(LIBS)
  144.  
  145. install : $(LIBS)
  146.     $(CP) $(LIBC) $(LIBDIR)
  147.     $(CP) $(CRT0) $(LIBDIR)
  148.     $(CP) libtermcap.a $(LIBDIR)
  149.