1999-11-17 10:59:06 -08:00
|
|
|
#########################################################################
|
|
|
|
# #
|
2011-07-27 07:17:02 -07:00
|
|
|
# OCaml #
|
1999-11-17 10:59:06 -08:00
|
|
|
# #
|
|
|
|
# Xavier Leroy, projet Cristal, INRIA Rocquencourt #
|
|
|
|
# #
|
|
|
|
# Copyright 1999 Institut National de Recherche en Informatique et #
|
|
|
|
# en Automatique. All rights reserved. This file is distributed #
|
2001-12-07 05:41:02 -08:00
|
|
|
# under the terms of the GNU Library General Public License, with #
|
|
|
|
# the special exception on linking described in file ../LICENSE. #
|
1999-11-17 10:59:06 -08:00
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
2007-11-06 07:16:56 -08:00
|
|
|
include Makefile.common
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2012-05-02 04:00:28 -07:00
|
|
|
CFLAGS=-DCAML_NAME_SPACE -O $(BYTECCCOMPOPTS) $(IFLEXDIR)
|
2010-08-02 07:37:22 -07:00
|
|
|
DFLAGS=-DCAML_NAME_SPACE -g -DDEBUG $(BYTECCCOMPOPTS) $(IFLEXDIR)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2013-07-01 05:12:33 -07:00
|
|
|
OBJS=$(COMMONOBJS) $(UNIX_OR_WIN32).o main.o
|
1995-05-04 03:15:53 -07:00
|
|
|
DOBJS=$(OBJS:.o=.d.o) instrtrace.d.o
|
2008-08-06 01:56:32 -07:00
|
|
|
PICOBJS=$(OBJS:.o=.pic.o)
|
|
|
|
|
2009-07-20 04:51:50 -07:00
|
|
|
SHARED_LIBS_TMP=$(SUPPORTS_SHARED_LIBRARIES:%false=)
|
|
|
|
SHARED_LIBS_DEPS=$(SHARED_LIBS_TMP:%true=libcamlrun_shared.so)
|
2008-08-06 01:56:32 -07:00
|
|
|
|
2009-07-20 04:51:50 -07:00
|
|
|
all:: $(SHARED_LIBS_DEPS)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2000-08-10 02:58:08 -07:00
|
|
|
ocamlrun$(EXE): libcamlrun.a prims.o
|
2007-11-15 05:21:15 -08:00
|
|
|
$(MKEXE) $(BYTECCLINKOPTS) -o ocamlrun$(EXE) \
|
2008-09-09 22:51:11 -07:00
|
|
|
prims.o libcamlrun.a $(BYTECCLIBS)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2000-08-10 02:58:08 -07:00
|
|
|
ocamlrund$(EXE): libcamlrund.a prims.o
|
2012-07-26 12:21:54 -07:00
|
|
|
$(MKEXE) $(MKEXEDEBUGFLAG) $(BYTECCLINKOPTS) -o ocamlrund$(EXE) \
|
2008-09-09 22:51:11 -07:00
|
|
|
prims.o libcamlrund.a $(BYTECCLIBS)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2007-11-08 00:54:30 -08:00
|
|
|
libcamlrun.a: $(OBJS)
|
2013-03-28 09:10:24 -07:00
|
|
|
ar rc libcamlrun.a $(OBJS)
|
|
|
|
$(RANLIB) libcamlrun.a
|
1997-01-05 06:06:13 -08:00
|
|
|
|
1996-07-23 01:12:11 -07:00
|
|
|
libcamlrund.a: $(DOBJS)
|
2013-03-28 09:10:24 -07:00
|
|
|
ar rc libcamlrund.a $(DOBJS)
|
|
|
|
$(RANLIB) libcamlrund.a
|
1996-07-23 01:12:11 -07:00
|
|
|
|
2008-08-06 01:56:32 -07:00
|
|
|
libcamlrun_shared.so: $(PICOBJS)
|
2008-12-03 10:09:09 -08:00
|
|
|
$(MKDLL) -o libcamlrun_shared.so $(PICOBJS) $(BYTECCLIBS)
|
2008-08-06 01:56:32 -07:00
|
|
|
|
2009-07-20 04:51:50 -07:00
|
|
|
install::
|
|
|
|
if test -f libcamlrun_shared.so; then \
|
2014-04-07 00:06:17 -07:00
|
|
|
cp libcamlrun_shared.so $(INSTALL_LIBDIR)/libcamlrun_shared.so; fi
|
2009-07-20 04:51:50 -07:00
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f libcamlrun_shared.so
|
|
|
|
|
2014-12-27 00:44:48 -08:00
|
|
|
%.d.o: %.c
|
|
|
|
$(CC) -c $(DFLAGS) $< -o $@
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2014-12-27 00:44:48 -08:00
|
|
|
%.pic.o: %.c
|
|
|
|
$(CC) -c $(CFLAGS) $(SHAREDCCCOMPOPTS) $< -o $@
|
2008-08-06 01:56:32 -07:00
|
|
|
|
2014-12-27 06:41:49 -08:00
|
|
|
depend : prims.c caml/opnames.h caml/jumptbl.h caml/version.h
|
2015-01-20 09:02:26 -08:00
|
|
|
-$(CC) -MM $(BYTECCCOMPOPTS) *.c > .depend
|
|
|
|
-$(CC) -MM $(BYTECCCOMPOPTS) -DDEBUG *.c | sed -e 's/\.o/.d.o/' >> .depend
|
|
|
|
-$(CC) -MM $(BYTECCCOMPOPTS) *.c | sed -e 's/\.o/.pic.o/' >> .depend
|
2007-11-22 11:01:50 -08:00
|
|
|
.PHONY: depend
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
include .depend
|