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
|
|
|
|
2007-11-13 09:18:25 -08:00
|
|
|
OBJS=$(COMMONOBJS) unix.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 \
|
|
|
|
cp libcamlrun_shared.so $(LIBDIR)/libcamlrun_shared.so; fi
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f libcamlrun_shared.so
|
|
|
|
|
2012-01-08 00:31:47 -08:00
|
|
|
.SUFFIXES: .d.o .pic.o
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2012-01-08 00:31:47 -08:00
|
|
|
.c.d.o:
|
2011-01-06 06:23:20 -08:00
|
|
|
ln -s -f $*.c $*.d.c
|
|
|
|
$(CC) -c $(DFLAGS) $*.d.c
|
2012-01-08 00:31:47 -08:00
|
|
|
rm $*.d.c
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2012-01-08 00:31:47 -08:00
|
|
|
.c.pic.o:
|
2011-01-06 06:23:20 -08:00
|
|
|
ln -s -f $*.c $*.pic.c
|
|
|
|
$(CC) -c $(CFLAGS) $(SHAREDCCCOMPOPTS) $*.pic.c
|
2012-01-08 00:31:47 -08:00
|
|
|
rm $*.pic.c
|
2012-01-06 05:42:46 -08:00
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f *.pic.c *.d.c
|
2008-08-06 01:56:32 -07:00
|
|
|
|
2004-11-26 17:04:19 -08:00
|
|
|
depend : prims.c opnames.h jumptbl.h version.h
|
2006-09-20 04:14:37 -07:00
|
|
|
-gcc -MM $(BYTECCCOMPOPTS) *.c > .depend
|
|
|
|
-gcc -MM $(BYTECCCOMPOPTS) -DDEBUG *.c | sed -e 's/\.o/.d.o/' >> .depend
|
2008-08-06 01:56:32 -07:00
|
|
|
-gcc -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
|