source: release/1.7/source/lisp-kernel/linuxx8632/Makefile

Last change on this file was 15268, checked in by gb, 7 years ago

Pass --no-as-needed in Linux linker scripts in 1.7 branch, too.
(This time via -Wl,--no-as-needed.)

File size: 2.8 KB
Line 
1#
2#   Copyright (C) 2008 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
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 -DUSE_FUTEX -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        image.o thread_manager.o lisp-debug.o memory.o unix-calls.o
53
54DEBUGOBJ = lispdcmd.o plprint.o plsym.o xlbt.o x86_print.o
55KERNELOBJ= $(COBJ) x86-asmutils32.o  imports.o
56
57SPINC = lisp.s m4macros.m4 x86-constants.s x86-macros.s errors.s x86-uuo.s \
58        x86-constants32.s
59
60CHEADERS = area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
61        lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
62        threads.h x86-constants32.h x86-exceptions.h lisptypes.h \
63        $(PLATFORM_H) constants.h os-linux.h
64
65
66KSPOBJ = $(SPOBJ)
67all:    ../../lx86cl
68
69
70OSLIBS = -ldl -lm -lpthread
71LINK_SCRIPT = # ./elf_x86_32.x
72USE_LINK_SCRIPT = # -T $(LINK_SCRIPT)
73
74../../lx86cl:   $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile  $(LINK_SCRIPT)
75        $(CC)  -m32 $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -o $@ $(USE_LINK_SCRIPT) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) -Wl,--no-as-needed $(OSLIBS)
76
77
78$(SPOBJ): $(SPINC)
79$(ASMOBJ): $(SPINC)
80$(COBJ): $(CHEADERS)
81$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
82
83
84cclean:
85        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../lx86cl
86
87clean:  cclean
88        $(RM) -f $(SPOBJ)
89
90strip:  ../../lx86cl
91        strip -g ../../lx86cl
Note: See TracBrowser for help on using the repository browser.