mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-17 08:33:48 +00:00
* Move clang/gcc options into makefile-header. This puts all of the shared options into a single place so that we can easily update it. * Add -fwrapv to the clang/gcc command lines. This is a step along the way to fixing interlisp/medley#90. Enabling `-fwrapv` will let overflow checks that rely upon undefined behavior to work correctly. Without this, with modern versions of clang and gcc, the overflow checks in the C code are eliminated by the compiler, resulting in incorrect behavior on the part of Maiko. See the linked bug for details and discussion. Hopefully, this usage of `-fwrapv` will go away once we're using the correct compiler builtins to detect and handle overflow correctly.
53 lines
1.5 KiB
Plaintext
53 lines
1.5 KiB
Plaintext
# Options for MacOS, x86 processor, X windows, for INIT processing
|
|
|
|
CC = clang -m32 $(CLANG_CFLAGS)
|
|
OEXT=.o
|
|
|
|
XFILES = $(OBJECTDIR)xmkicon.o \
|
|
$(OBJECTDIR)xbbt.o \
|
|
$(OBJECTDIR)dspif.o \
|
|
$(OBJECTDIR)xinit.o \
|
|
$(OBJECTDIR)xscroll.o \
|
|
$(OBJECTDIR)xcursor.o \
|
|
$(OBJECTDIR)xlspwin.o \
|
|
$(OBJECTDIR)xrdopt.o \
|
|
$(OBJECTDIR)xwinman.o
|
|
|
|
|
|
XVERSION = XV11R4
|
|
XFLAGS = -I/opt/X11/include -DXWINDOW -DNOPIXRECT -D$(XVERSION)
|
|
|
|
# OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it
|
|
OPTFLAGS = -O0 -g
|
|
DISPOPTFLAGS = -O0 -g
|
|
FPFLAGS =
|
|
DFLAGS = -DNEW_STORAGE -DMACOSX -DOLD_CURSOR \
|
|
-DBYTESWAP -DFORKCOMM -DNOFORN -DLOGINT $(XFLAGS) \
|
|
-DRELEASE=351 -DNOVERSION -DINIT -DTRACE -DOPTRACE
|
|
|
|
LDFLAGS = -L/usr/X11/lib -lX11 -lm
|
|
LDELDFLAGS = -L/usr/X11/lib -lX11 -lm
|
|
|
|
INLINE = # $(SRCDIR)dspSPARC.il
|
|
BITBLTFILE = # $(OBJECTDIR)bbtSPARC.o
|
|
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
|
|
|
|
OBJECTDIR = ../$(RELEASENAME)/
|
|
|
|
default : ../$(OSARCHNAME)/lde
|
|
|
|
############
|
|
#
|
|
# Normal compilation for xc.o without optimized dispatch loop hacks
|
|
#
|
|
############
|
|
$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h \
|
|
$(INCDIR)address.h \
|
|
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
|
|
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
|
|
$(INCDIR)initatms.h $(INCDIR)gcdata.h \
|
|
$(INCDIR)arith.h $(INCDIR)stream.h \
|
|
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
|
|
$(INCDIR)tosfns.h $(INCDIR)inlineC.h
|
|
$(CC) $(DISPRFLAGS) -UOPDISP $(SRCDIR)xc.c -I$(INCDIR) -o $(OBJECTDIR)xc.o
|