source: trunk/source/lisp-kernel/darwinx8632/Makefile @ 13600

Last change on this file since 13600 was 13600, checked in by gb, 10 years ago

Define PLATFORM_H, force its inclusion via -include. (This needs to be
done on other platforms as well; so far, only darwinx86 has been tested
at all.)

File size: 2.9 KB
Line 
1#
2#   Copyright (C) 2005 Clozure Associates and contributors.
3#   This file is part of Clozure CL. 
4#
5#   Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
6#   License , known as the LLGPL and distributed with Clozure CL as the
7#   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
8#   which is distributed with Clozure CL as the file "LGPL".  Where these
9#   conflict, the preamble takes precedence. 
10#
11#   Clozure CL is referenced in the preamble as the "LIBRARY."
12#
13#   The LLGPL is also available online at
14#   http://opensource.franz.com/preamble.html
15
16
17MDYNAMIC_NO_PIC = $(shell ($(CC) --help -v 2>&1 | grep -q -e "-mdynamic-no-pic") && /bin/echo "-mdynamic-no-pic")
18
19VPATH = ..
20RM = /bin/rm
21LD = ld
22LDFLAGS =  -macosx_version_min 10.5 -arch i386 -dynamic  -o $@ -e start -pagezero_size 0x11000 -seg1addr 0x00011000 -sectalign __TEXT __text 0x1000
23AS = as
24M4 = gm4
25M4FLAGS = -DDARWIN -DX86 -DX8632
26ASFLAGS = -arch i386 -g
27CDEFINES = -DDARWIN -DX86 -DX8632 #-DGC_INTEGRITY_CHECKING -DFORCE_DWS_MARK -DDISABLE_EGC -DDEBUG_MACH_EXCEPTIONS
28CDEBUG = -g
29COPT = -O2
30# Once in a while, -Wformat says something useful.  The odds are against that,
31# however.
32WFORMAT = -Wno-format
33CC=gcc-4.0
34PLATFORM_H = platform-darwinx8632.h
35
36.s.o:
37        $(M4) $(M4FLAGS) -I../ $< | $(AS) $(ASFLAGS) -o $@
38.c.o:
39        $(CC) -include ../$(PLATFORM_H) -c -arch i386 $< $(CDEFINES) $(CDEBUG) $(COPT) $(MDYNAMIC_NO_PIC) $(WFORMAT) -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -o $@
40
41SPOBJ = x86-spjump32.o x86-spentry32.o x86-subprims32.o
42ASMOBJ = x86-asmutils32.o imports.o
43
44COBJ  = pmcl-kernel.o gc-common.o bits.o  \
45        thread_manager.o lisp-debug.o image.o memory.o x86-gc.o \
46        x86-exceptions.o unix-calls.o
47
48DEBUGOBJ = lispdcmd.o plprint.o plsym.o x86_print.o xlbt.o
49KERNELOBJ= imports.o $(COBJ) x86-asmutils32.o
50
51SPINC = lisp.s m4macros.m4 x86-constants.s x86-macros.s errors.s x86-uuo.s x86-constants32.s
52
53CHEADERS = area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
54        lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
55        Threads.h lisptypes.h x86-constants32.h x86-exceptions.h $(PLATFORM_H)
56
57# Subprims linked into the kernel ?
58# Yes:
59
60KSPOBJ= $(SPOBJ)
61all:    ../../dx86cl
62
63
64# No:
65
66# KSPOBJ=
67
68OSEARLYLIBS = -lcrt1.o
69OSLATELIBS = -lSystem
70
71# is this needed?
72#OSMIDDLELIBS = -lSystemStubs
73
74OSLIBS = $(OSEARLYLIBS) $(OSMIDDLELIBS) $(OSLATELIBS)
75
76../../dx86cl:    $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile
77        $(LD)  $(LDFLAGS) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ)   $(OSLIBS)
78
79
80$(SPOBJ): $(SPINC)
81$(ASMOBJ): $(SPINC)
82$(COBJ): $(CHEADERS)
83$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
84
85
86
87thread_manager.o: thread_manager.c
88
89cclean:
90        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../dx86cl
91
92# Some earlier versions of this Makefile built "subprims_r.o". 
93# (That file is now defunct.)
94clean:  cclean
95        $(RM) -f $(SPOBJ) $(KSPOBJ) subprims_r.o
96
97# retain file not here at the moment
98strip:  ../../dx86cl
99        strip -s retain ../../dx86cl
100
Note: See TracBrowser for help on using the repository browser.