65 lines
2.3 KiB
Makefile
65 lines
2.3 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 Library General Public License, with #
|
|
# the special exception on linking described in file ../LICENSE. #
|
|
# #
|
|
#########################################################################
|
|
|
|
include Makefile.common
|
|
|
|
CFLAGS=-DOCAML_STDLIB_DIR='"$(LIBDIR)"' $(IFLEXDIR)
|
|
|
|
ifdef BOOTSTRAPPING_FLEXLINK
|
|
MAKE_OCAMLRUN=$(MKEXE_BOOT)
|
|
CFLAGS:=-DBOOTSTRAPPING_FLEXLINK $(CFLAGS)
|
|
else
|
|
MAKE_OCAMLRUN=$(MKEXE) -o $(1) $(2)
|
|
endif
|
|
|
|
DBGO=d.$(O)
|
|
OBJS=$(COMMONOBJS:.o=.$(O)) win32.$(O) main.$(O)
|
|
DOBJS=$(OBJS:.$(O)=.$(DBGO)) instrtrace.$(DBGO)
|
|
|
|
ocamlrun$(EXE): libcamlrun.$(A) prims.$(O)
|
|
$(call MAKE_OCAMLRUN,ocamlrun$(EXE),prims.$(O) libcamlrun.$(A) \
|
|
$(call SYSLIB,ws2_32) $(EXTRALIBS))
|
|
|
|
ocamlrund$(EXE): libcamlrund.$(A) prims.$(O) main.$(O)
|
|
$(MKEXE) -o ocamlrund$(EXE) $(BYTECCDBGCOMPOPTS) prims.$(O) \
|
|
$(call SYSLIB,ws2_32) $(EXTRALIBS) libcamlrund.$(A)
|
|
|
|
libcamlrun.$(A): $(OBJS)
|
|
$(call MKLIB,libcamlrun.$(A),$(OBJS))
|
|
|
|
libcamlrund.$(A): $(DOBJS)
|
|
$(call MKLIB,libcamlrund.$(A),$(DOBJS))
|
|
|
|
%.$(O): %.c
|
|
$(CC) $(CFLAGS) $(BYTECCCOMPOPTS) -c $<
|
|
|
|
%.$(DBGO): %.c
|
|
$(CC) $(CFLAGS) $(BYTECCDBGCOMPOPTS) -c -o $@ $<
|
|
|
|
.depend.nt: .depend
|
|
rm -f .depend.win32
|
|
echo "win32.o: win32.c caml/fail.h caml/compatibility.h \\"\
|
|
>> .depend.win32
|
|
echo " caml/misc.h caml/config.h ../config/m.h ../config/s.h \\"\
|
|
>> .depend.win32
|
|
echo " caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \\"\
|
|
>> .depend.win32
|
|
echo " caml/freelist.h caml/minor_gc.h caml/osdeps.h caml/signals.h"\
|
|
>> .depend.win32
|
|
cat .depend >> .depend.win32
|
|
sed -e '/\.d\.o/q' -e 's/^\(.*\)\.o:/\1.$$(O) \1.$$(DBGO):/' \
|
|
.depend.win32 > .depend.nt
|
|
rm -f .depend.win32
|
|
|
|
include .depend.nt
|