89 lines
3.0 KiB
Makefile
89 lines
3.0 KiB
Makefile
#**************************************************************************
|
|
#* *
|
|
#* OCaml *
|
|
#* *
|
|
#* Xavier Leroy, projet Cristal, INRIA Rocquencourt *
|
|
#* *
|
|
#* Copyright 1999 Institut National de Recherche en Informatique et *
|
|
#* en Automatique. *
|
|
#* *
|
|
#* All rights reserved. This file is distributed under the terms of *
|
|
#* the GNU Lesser General Public License version 2.1, with the *
|
|
#* special exception on linking described in the file LICENSE. *
|
|
#* *
|
|
#**************************************************************************
|
|
|
|
include ../config/Makefile
|
|
|
|
CC=$(NATIVECC)
|
|
CFLAGS=-I../byterun -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) \
|
|
$(NATIVECCCOMPOPTS)
|
|
|
|
COBJS=startup_aux.$(O) startup.$(O) \
|
|
main.$(O) fail.$(O) roots.$(O) signals.$(O) signals_asm.$(O)\
|
|
misc.$(O) freelist.$(O) major_gc.$(O) minor_gc.$(O) memory.$(O) alloc.$(O) \
|
|
compare.$(O) ints.$(O) floats.$(O) str.$(O) array.$(O) io.$(O) extern.$(O) \
|
|
intern.$(O) hash.$(O) sys.$(O) parsing.$(O) gc_ctrl.$(O) terminfo.$(O) \
|
|
md5.$(O) obj.$(O) lexing.$(O) win32.$(O) printexc.$(O) callback.$(O) \
|
|
weak.$(O) compact.$(O) finalise.$(O) custom.$(O) globroots.$(O) \
|
|
backtrace_prim.$(O) backtrace.$(O) \
|
|
natdynlink.$(O) debugger.$(O) meta.$(O) dynlink.$(O) clambda_checks.$(O)
|
|
|
|
LINKEDFILES=misc.c freelist.c major_gc.c minor_gc.c memory.c alloc.c array.c \
|
|
compare.c ints.c floats.c str.c io.c extern.c intern.c hash.c sys.c \
|
|
parsing.c gc_ctrl.c terminfo.c md5.c obj.c lexing.c printexc.c callback.c \
|
|
weak.c compact.c meta.c finalise.c custom.c main.c globroots.c \
|
|
dynlink.c signals.c debugger.c startup_aux.c backtrace.c
|
|
|
|
ifeq ($(TOOLCHAIN),mingw)
|
|
ASMOBJS=$(ARCH).o
|
|
else
|
|
ASMOBJS=$(ARCH)nt.obj
|
|
endif
|
|
|
|
OBJS=$(COBJS) $(ASMOBJS)
|
|
|
|
all: libasmrun.$(A)
|
|
|
|
libasmrun.$(A): $(OBJS)
|
|
$(call MKLIB,libasmrun.$(A), $(OBJS))
|
|
|
|
i386nt.obj: i386nt.asm
|
|
$(ASM)i386nt.obj i386nt.asm
|
|
|
|
amd64nt.obj: amd64nt.asm
|
|
$(ASM)amd64nt.obj amd64nt.asm
|
|
|
|
i386.o: i386.S
|
|
$(ASPP) -DSYS_$(SYSTEM) i386.S
|
|
|
|
amd64.o: amd64.S
|
|
$(ASPP) -DSYS_$(SYSTEM) amd64.S
|
|
|
|
INSTALL_LIBDIR=$(DESTDIR)$(LIBDIR)
|
|
|
|
install:
|
|
cp libasmrun.$(A) "$(INSTALL_LIBDIR)"
|
|
|
|
$(LINKEDFILES): %.c: ../byterun/%.c
|
|
cp ../byterun/$*.c $*.c
|
|
|
|
# Need special compilation rule so as not to do -I../byterun
|
|
win32.$(O): ../byterun/win32.c
|
|
$(CC) -c $(NATIVECCCOMPOPTS) -DNATIVE_CODE $(IFLEXDIR) \
|
|
../byterun/win32.c
|
|
|
|
%.$(O): %.c
|
|
$(CC) $(CFLAGS) -c $<
|
|
|
|
clean::
|
|
rm -f $(LINKEDFILES)
|
|
|
|
clean::
|
|
rm -f *.$(O) *.$(A) *~
|
|
|
|
.depend.nt: .depend
|
|
sed -e 's/\.o/.$(O)/g' .depend > .depend.nt
|
|
|
|
include .depend.nt
|