source: trunk/source/lisp-kernel/linuxx8632/Makefile

Last change on this file was 16685, checked in by rme, 4 years ago

Update copyright/license headers in files.

File size: 2.8 KB
Line 
1#
2# Copyright 2008 Clozure Associates
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16SVN_REVISION := "$(shell svnversion || echo unknown)"
17
18VPATH = ../
19RM = /bin/rm
20AS = as
21M4 = m4
22ASFLAGS = --32
23M4FLAGS = -DLINUX -DX86 -DX8632 -DHAVE_TLS
24CDEFINES = -DLINUX -D_REENTRANT -DX86 -DX8632 -D_GNU_SOURCE -DHAVE_TLS -DSVN_REVISION=$(SVN_REVISION) # -DGC_INTEGRITY_CHECKING -DDISABLE_EGC
25CDEBUG = -g
26COPT = -O2
27# Once in a while, -Wformat says something useful.  The odds are against that,
28# however.
29WFORMAT = -Wno-format
30PLATFORM_H = platform-linuxx8632.h
31
32# If the linker supports a "--hash-style=" option, use traditional
33# SysV hash tables.  (If it doesn't support that option, assume
34# that traditional hash tables will be used by default.)
35ld_has_hash_style = $(shell $(LD) --help | grep "hash-style=")
36ifeq ($(ld_has_hash_style),)
37HASH_STYLE=
38else
39HASH_STYLE="-Wl,--hash-style=sysv"
40endif
41
42
43.s.o:
44        $(M4) $(M4FLAGS) -I../ $< | $(AS)  $(ASFLAGS) -o $@
45.c.o:
46        $(CC) -include ../$(PLATFORM_H) -c $< $(CDEFINES) $(CDEBUG) $(COPT) $(WFORMAT) -m32 -o $@
47
48SPOBJ = pad.o x86-spjump32.o x86-spentry32.o x86-subprims32.o
49ASMOBJ = x86-asmutils32.o imports.o
50
51COBJ  = pmcl-kernel.o gc-common.o x86-gc.o bits.o  x86-exceptions.o \
52        x86-utils.o \
53        image.o thread_manager.o lisp-debug.o memory.o unix-calls.o
54
55DEBUGOBJ = lispdcmd.o plprint.o plsym.o xlbt.o x86_print.o
56KERNELOBJ= $(COBJ) x86-asmutils32.o  imports.o
57
58SPINC = lisp.s m4macros.m4 x86-constants.s x86-macros.s errors.s x86-uuo.s \
59        x86-constants32.s lisp_globals.s
60
61CHEADERS = area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
62        lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
63        threads.h x86-constants32.h x86-exceptions.h lisptypes.h \
64        x86-utils.h \
65        $(PLATFORM_H) constants.h os-linux.h
66
67
68KSPOBJ = $(SPOBJ)
69all:    ../../lx86cl
70
71
72OSLIBS = -ldl -lm -lpthread -lrt
73LINK_SCRIPT = # ./elf_x86_32.x
74USE_LINK_SCRIPT = # -T $(LINK_SCRIPT)
75
76../../lx86cl:   $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile  $(LINK_SCRIPT)
77        $(CC)  -m32 $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -o $@ $(USE_LINK_SCRIPT) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) -Wl,--no-as-needed $(OSLIBS)
78
79
80$(SPOBJ): $(SPINC)
81$(ASMOBJ): $(SPINC)
82$(COBJ): $(CHEADERS)
83$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
84
85
86cclean:
87        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../lx86cl
88
89clean:  cclean
90        $(RM) -f $(SPOBJ)
91
92strip:  ../../lx86cl
93        strip -g ../../lx86cl
Note: See TracBrowser for help on using the repository browser.