home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari FTP
/
ATARI_FTP_0693.zip
/
ATARI_FTP_0693
/
Mint
/
mnthlb30.zoo
/
patch
/
makefile
< prev
Wrap
Makefile
|
1993-06-05
|
5KB
|
149 lines
# Makefile for hacked MiNTlib for Heat-n-Serve/Sozobon C, version 1.33i
# and above. This makefile works with the make provided with 1.40 and
# up, and less well with the make provided with 1.33i
# Where to install libraries.
# LIBDIR = c:\sozobon\lib
LIBDIR = u:\lib
# You might want any or all of these; Sozobon's make predefines most of them.
AR = ar
#CP = cp
#RM = rm -f
MAKE = make
# A trick to build a v1.40-compatible library with a v2.00 or higher
# compiler -- either uncomment this line or build the target
# "short_names". This isn't necessary unless you're building an old
# library with a new compiler (and hopefully by the next release it
# won't be necessary at all).
#SHORTNAMES = -8
AFLAGS = $(SHORTNAMES)
# To build the .cpp files, you'll need my stand-alone preprocessor,
# which should be available where you got this archive.
CPP = cpp
CPPFLAGS = -P -Wno-bad-chars -D__SOZOBON__ -D__MSHORT__
# 1.33i's top apparently takes about 30 minutes on doprnt.c; if you don't
# want to wait that long, use the alternate definition of NOOPT.
# Unfortunately, there is an optimizer bug in 1.40 that bites here; if
# you're using that version, you must use the non-optimizing version.
CFLAGS = -O -D__NO_FLOAT__ -DNDEBUG $(SHORTNAMES)
#NOOPT = -D__NO_FLOAT__ -DNDEBUG $(SHORTNAMES) # without debugging
NOOPT = $(CFLAGS) # with debugging
# If you prefer more "standard" Unix-like names for your library files, use
# the alternate definitions of CRT0 and LIBC -- assuming, of course, that
# your cc has been modified to recognize those names!
# CRT0 = crt0.o
# LIBC = libc.a
CRT0 = dstart.o
LIBC = dlibs.a
LIBS = $(CRT0) $(LIBC) libtermcap.a
all : $(LIBS)
# These are in alphabetical order to make it easy to find one.
OBJECTS = \
abort.o abs.o access.o alarm.o alglobal.o alloca.o alphasor.o \
atexit.o atol.o \
bcmp.o bcopy.o binmode.o bsearch.o bzero.o \
calloc.o chdir.o chmod.o clock.o close.o console.o crtinit.o \
ctime.o ctype.o \
defmode.o difftime.o dirent.o doprnt.o dup.o \
eprintf.o exec.o execp.o\
fclose.o fcntl.o fdopen.o fflush.o fgetc.o fgets.o filbuf.o \
findfile.o fopen.o fopenp.o fork.o fprintf.o fputc.o fputs.o \
fread.o frwbin.o fscanf.o fseek.o fsetpos.o ftw.o fungetc.o \
fwrite.o \
getbuf.o getcwd.o getdtabl.o getenv.o getgroup.o gethostn.o \
getlogin.o getopt.o getpages.o getpass.o getpid.o getpw.o \
getrusag.o gets.o getuid.o getw.o grp.o \
heapbase.o \
ic.o ident.o ig.o il.o inistack.o initsig.o ioctl.o ip.o \
isatty.o iw.o \
kill.o killpg.o \
linea.o link.o lmalloc.o localtim.o lockf.o lseek.o ltoa.o \
main.o malloc.o memccpy.o memchr.o memcmp.o mkdir.o mknod.o \
mktemp.o \
nice.o \
obstack.o open.o osbind.o \
pause.o perror.o pipe.o popen.o psignal.o putenv.o \
qsort.o \
raise.o rand.o random.o read.o realloc.o regexp.o regsup.o \
rename.o rmdir.o \
sbrk.o scandir.o scanf.o select.o setbuf.o setjmp.o setlocal.o \
setrlimi.o setvbuf.o sgtty.o sigactio.o sigblock.o siglist.o \
signal.o sleep.o sozolong.o sozulong.o spawn.o spawnve.o \
spawnvp.o sprintf.o sscanf.o stat.o statfs.o stksiz.o strcat.o \
strchr.o strcmp.o strcoll.o strcpy.o strcspn.o strdup.o \
strerror.o strftime.o stricmp.o strlen.o strlwr.o strncat.o \
strncmp.o strncpy.o strnicmp.o strpbrk.o strrchr.o strrev.o \
strspn.o strstr.o strtok.o strtol.o strtoul.o strupr.o symlink.o \
sysconf.o system.o sysvar.o \
textio.o thread.o time.o timeoday.o times.o tmpfile.o tmpnam.o \
toxxx.o ttyname.o \
uname.o unlink.o unx2dos.o utime.o utmp.o \
vfork.o \
wait.o wait3.o waitpid.o write.o wtmp.o
# Rule to handle .cpp files
.SUFFIXES: .cpp
.cpp.s:
$(CPP) $(CPPFLAGS) $< $*.i
mit2mot $*.i
$(RM) $*.i
.cpp.o:
$(CPP) $(CPPFLAGS) $< $*.i
mit2mot $*.i
$(RM) $*.i
$(AS) $(AFLAGS) $*.s
# Make sure the targets get built if necessary
alloca.o: alloca.cpp
bcopy.o: bcopy.cpp
bzero.o: bzero.cpp
crt0.o: crt0.cpp
osbind.o: osbind.cpp
setjmp.o: setjmp.cpp
vfork.o: vfork.cpp
# If you're using 1.33i's make or ar, this command will fail spectacularly
# for the first build; you'll have to build it by hand, a few files
# at a time. After that, if you only change a few files at a time,
# you shouldn't have problems. Later versions are compiled with ARGV
# and have no problems.
$(LIBC) : $(OBJECTS)
$(AR) rv $@ $?
doprnt.o: doprnt.c
$(CC) $(NOOPT) -c $?
libtermcap.a : termcap.o
$(AR) rv $@ $?
# this is ugly, but I can't think of a way around it without risking the TOS
# "copy file to itself" bug. If you have CRT0 = crt0.o, this rule will
# never be used anyway.
dstart.o : crt0.o
$(CP) $? $@
# The trick described above -- force v2.00+ compilers to generate short
# identifiers compatible with v1.40 and before.
short_names:
$(MAKE) SHORTNAMES=-8
clean :
$(RM) *.o
realclean : clean
$(RM) $(LIBS)
install : $(LIBS)
$(CP) $(LIBC) $(LIBDIR)
$(CP) $(CRT0) $(LIBDIR)
$(CP) libtermcap.a $(LIBDIR)