/[cmucl]/src/lisp/GNUmakefile
ViewVC logotype

Contents of /src/lisp/GNUmakefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.25 - (hide annotations)
Tue Jul 24 19:09:13 2007 UTC (6 years, 8 months ago) by rtoy
Branch: MAIN
CVS Tags: snapshot-2007-08, pre-telent-clx
Changes since 1.24: +8 -1 lines
Add initial support executables on Solaris with gcc.  Executables are
created and will run, but you can't load new files.  Still needs work.

src/exec-init.c:
o New file that defines builtin_image_flag and initial_function_addr,
  instead of being defined in lisp.c

code/sunos-os.lisp:
o Register the :executable feature if needed.

lisp/GNUmakefile:
o Add exec-init.c to list of src files.
o Remove exec-init.o from lisp.a when building on Solaris.

lisp/elf.c:
o Port the elf code to Solaris.
  - Basically set up the correct values for the elf header and
    sections.
  - The ELF core sections on Solaris don't have valid addresses so we
    explicitly set them when mapping the core sections.

lisp/elf.h
o Use SOLARIS instead of sparc.

lisp/lisp.c:
o builtin_image_flag and initial_function_addr moved to exec-init.c.

tools/linker.sh:
o Support Solaris

tools/make-main-dist.sh:
o Support Solaris

tools/SunOS-cmucl-linker-script:
o New file for SunOS executable.
1 rtoy 1.25 # $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/GNUmakefile,v 1.25 2007/07/24 19:09:13 rtoy Exp $
2 wlott 1.1
3     all: lisp.nm
4    
5     CC = gcc
6 ram 1.12
7 toy 1.19 DEPEND = $(CC) -MM -E
8 pmai 1.20 DEPEND_FLAGS =
9 wlott 1.1
10 gerd 1.22 -include internals.inc
11 wlott 1.1 include Config
12    
13 ram 1.12 ifndef GC_SRC
14     GC_SRC = gc.c
15     endif
16    
17 hallgren 1.5 SRCS = lisp.c coreparse.c alloc.c monitor.c print.c interr.c \
18 ram 1.12 vars.c parse.c interrupt.c search.c validate.c globals.c \
19 wlott 1.1 dynbind.c breakpoint.c regnames.c backtrace.c save.c purify.c \
20 pw 1.13 socket.c runprog.c time.c \
21 rtoy 1.25 exec-init.c \
22 ram 1.12 ${ARCH_SRC} ${ASSEM_SRC} ${OS_SRC} ${GC_SRC}
23 ram 1.10
24 wlott 1.11 OBJS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(patsubst %.s,%.o,$(SRCS))))
25 wlott 1.1
26     ### Don't look in RCS for the files, because we might not want the latest.
27     %: RCS/%,v
28 pw 1.14
29 fgilham 1.24 lisp.nm: lisp lisp.a
30 hallgren 1.5 echo 'Map file for lisp version ' `cat version` > ,lisp.nm
31 toy 1.18 $(NM) lisp | grep -v " [F] " >> ,lisp.nm
32 wlott 1.1 mv ,lisp.nm lisp.nm
33    
34 ram 1.9 lisp: version.c ${OBJS} version
35 hallgren 1.5 echo '1 + ' `cat version` | bc > ,version
36 wlott 1.1 mv ,version version
37 ram 1.9 $(CC) ${CFLAGS} -DVERSION=`cat version` -c $<
38 ram 1.8 $(CC) -g ${OS_LINK_FLAGS} -o ,lisp \
39 wlott 1.1 ${OBJS} version.o \
40     ${OS_LIBS} -lm
41     mv -f ,lisp lisp
42    
43 rtoy 1.25 # Create a library out of all the object files so we can build an
44     # executable. However, for Solaris, we need to remove exec-init.o
45     # because the linker will add the write symbols in.
46 fgilham 1.24 lisp.a: version.o ${OBJS}
47     ar crs lisp.a version.o ${OBJS}
48 rtoy 1.25 ifdef FEATURE_SOLARIS
49     ar d lisp.a exec-init.o
50     endif
51 fgilham 1.24
52 wlott 1.1 version:
53     echo 0 > version
54    
55     ### Socket.c needs to be compiled with UNIXCONN defined.
56     socket.o: socket.c
57 ram 1.9 $(COMPILE.c) -DUNIXCONN $<
58 wlott 1.1
59 gerd 1.22 internals.h internals.inc:
60 wlott 1.1 @echo "You must run genesis to create internals.h!"
61     @false
62    
63     clean:
64 wlott 1.4 rm -f Depends *.o lisp lisp.nm core
65 wlott 1.1
66 pmai 1.16 depend: Depends
67    
68     Depends: ${SRCS}
69 toy 1.21 $(DEPEND) ${DEPEND_FLAGS} ${CFLAGS} ${CPPFLAGS} $^ > ,depends
70 wlott 1.1 mv ,depends Depends
71    
72 cshapiro 1.23 -include Depends

  ViewVC Help
Powered by ViewVC 1.1.5