Changeset 14570


Ignore:
Timestamp:
Jan 10, 2011, 8:08:53 AM (9 years ago)
Author:
gb
Message:

Build the lisp kernel as a shared library; build some aux programs
here.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/androidarm/Makefile

    r14516 r14570  
    1414#   http://opensource.franz.com/preamble.html
    1515
     16LIBBASE = 0x04001000
    1617NDK = /usr/local/android-ndk-r5
    1718HOST = darwin-x86
     
    2728CC = $(NDKBIN)gcc --sysroot $(SYSROOT)
    2829LD = $(NDKBIN)ld
     30HOSTCC = cc -m32
    2931M4 = m4
    3032ASFLAGS = -mfpu=vfp
    31 M4FLAGS = -DLINUX -DARM -DANDROID
    32 CDEFINES = -DLINUX -DARM -DANDROID -D_REENTRANT -D_GNU_SOURCE -DUSE_FUTEX
     33M4FLAGS = -DLINUX -DARM -DANDROID -DLIBBASE=$(LIBBASE)
     34CDEFINES = -DLINUX -DARM -DANDROID -D_REENTRANT -D_GNU_SOURCE -DUSE_FUTEX -DCCLSHARED
    3335CDEBUG = -g
    3436COPT = #-O2
     
    3739WFORMAT = -Wno-format
    3840PLATFORM_H = platform-androidarm.h
    39 
    4041
    4142# If the linker supports a "--hash-style=" option, use traditional
     
    5455        $(M4) $(M4FLAGS) -I../ $< | $(AS) $(ASFLAGS) -o $@
    5556.c.o:
    56         $(CC) -include ../$(PLATFORM_H) -I. -I$(NDKINC) -c $<  $(CDEFINES) $(CDEBUG) $(COPT) -fpic  $(WFORMAT)  -o $@
     57        $(CC) -include ../$(PLATFORM_H) -I. -I$(NDKINC) -c $<  $(CDEFINES) $(CDEBUG) $(COPT) $(WFORMAT) -fpic -o $@
     58
    5759
    5860# -nostdinc -isystem ${NDK}/usr/gcc-include -isystem $(NDK)/usr/include
    59 SPOBJ = pad.o  arm-spentry.o arm-subprims.o
     61SPOBJ = pad.o  arm-spentry.o
     62#arm-subprims.o
    6063ASMOBJ = arm-asmutils.o imports.o
    6164
     
    7679
    7780KSPOBJ = $(SPOBJ)
    78 all:    ../../aarmcl
     81all:    ../../aarmcl.so ../../aarmcl
     82
     83aarmcl.o: aarmcl.c
     84        $(CC) -g -I$(NDKINC) -c $< -fpic -o $@
    7985
    8086# No:
     
    8389# all:  ../../armcl ../../subprims.so
    8490
    85 OSLIBS = -ldl -lm -lc $(NDKLIB)/crtbegin_dynamic.o $(NDKLIB)/crtend_android.o
     91OSLIBS = -ldl -lm -lc
     92APPLIBS = $(OSLIBS) $(NDKLIB)/crtbegin_dynamic.o $(NDKLIB)/crtend_android.o
    8693
    8794
    88 ../../aarmcl:   $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ)
    89         $(LD) -Bdynamic -e _start  -dynamic-linker /system/bin/linker -nostdlib -z nocopyreloc  -o ../../aarmcl  -L $(NDKLIB) pad.o arm-spentry.o arm-subprims.o pmcl-kernel.o gc-common.o arm-gc.o bits.o arm-exceptions.o image.o thread_manager.o lisp-debug.o memory.o unix-calls.o arm-asmutils.o imports.o lispdcmd.o plprint.o plsym.o albt.o arm_print.o $(OSLIBS) -T ./armandroid.x
     95../../aarmcl.so:        $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) ./armandroid.x ./fixlib
     96        $(LD) --shared -Bdynamic -dynamic-linker /system/bin/linker -nostdlib -z nocopyreloc  -o ../../aarmcl.so  -L $(NDKLIB) pad.o arm-spentry.o  pmcl-kernel.o gc-common.o arm-gc.o bits.o arm-exceptions.o image.o thread_manager.o lisp-debug.o memory.o unix-calls.o arm-asmutils.o imports.o lispdcmd.o plprint.o plsym.o albt.o arm_print.o $(OSLIBS) -T ./armandroid.x -M
     97        ./fixlib $(LIBBASE) >> ../../aarmcl.so
    9098
     99../../aarmcl:   aarmcl.o
     100                $(LD) -Bdynamic -e _start  -dynamic-linker /system/bin/linker -nostdlib -z nocopyreloc  -o ../../aarmcl -L $(NDKLIB) aarmcl.o $(APPLIBS)
    91101
     102./fixlib: ./fixlib.c
     103        $(HOSTCC) -g $< -o $@
    92104
    93105$(SPOBJ): $(SPINC)
     
    98110
    99111cclean:
    100         $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../aarmcl
     112        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../aarmcl ../../aarmcl.so ./fixlib
    101113
    102114clean:  cclean
    103115        $(RM) -f $(SPOBJ)
    104116
    105 strip:  ../../ppccl
    106         strip -g ../../ppccl
Note: See TracChangeset for help on using the changeset viewer.