Merge Unix and Windows build systems in the asmrun directory (#941)

* Merge Unix and Windows build systems in the asmrun directory

Changes in make variables:

  - Removal of the SHARED make variable, which had the same
    semantics than SUPPORTS_SHARED_LIBRARIES, the later having values true
    and false while the former had values shared and noshared.
    (SHARED was not defined on Windows)
  - RUNTIMED now takes values true and false rather than runtimed and
    noruntimed

* Do not use -O0 in asmrun's Makefile

* Add /asmrun/win32.c to .gitignore

* Build PIC libraries only under Unix

This makes things closer to what they were before, since PIC objects
were not built for Windows.
master
Sébastien Hinderer 2016-12-20 16:54:20 +01:00 committed by Damien Doligez
parent afbd5a389a
commit 68ad1bb923
13 changed files with 169 additions and 252 deletions

1
.gitignore vendored
View File

@ -95,6 +95,7 @@
/asmrun/terminfo.c
/asmrun/unix.c
/asmrun/weak.c
/asmrun/win32.c
/boot/Saved
/boot/ocamlrun

View File

@ -15,159 +15,183 @@
include ../config/Makefile
include Makefile.shared
CC=$(NATIVECC)
FLAGS=-I../byterun -DNATIVE_CODE \
-DTARGET_$(ARCH) -DMODEL_$(MODEL) -DSYS_$(SYSTEM) $(IFLEXDIR) \
$(LIBUNWIND_INCLUDE_FLAGS)
#CFLAGS=$(FLAGS) -g -O0
CFLAGS=$(FLAGS) -g -O0 $(NATIVECCCOMPOPTS)
DFLAGS=$(FLAGS) -g -DDEBUG $(NATIVECCCOMPOPTS)
IFLAGS=$(FLAGS) -DCAML_INSTR
PFLAGS=$(FLAGS) -pg -DPROFILING $(NATIVECCPROFOPTS) $(NATIVECCCOMPOPTS)
PICFLAGS=$(FLAGS) $(SHAREDCCCOMPOPTS) $(NATIVECCCOMPOPTS)
ASMOBJS=$(ARCH).o
OBJS=$(COBJS) $(ASMOBJS)
DOBJS=$(COBJS:.o=.d.o) $(ASMOBJS)
IOBJS=$(COBJS:.o=.i.o) $(ASMOBJS)
POBJS=$(COBJS:.o=.p.o) $(ASMOBJS:.o=.p.o)
PICOBJS=$(COBJS:.o=.pic.o) $(ASMOBJS:.o=.pic.o)
ifeq "$(PROFILING)" "true"
PROFILINGTARGET = prof
else
PROFILINGTARGET = noprof
endif
all: libasmrun.a all-$(RUNTIMED) all-$(PROFILINGTARGET) all-$(SHARED)
ifeq "$(RUNTIMEI)" "true"
all: libasmruni.a
endif
libasmrun.a: $(OBJS)
rm -f libasmrun.a
$(ARCMD) rc libasmrun.a $(OBJS)
$(RANLIB) libasmrun.a
all-noruntimed:
.PHONY: all-noruntimed
all-runtimed: libasmrund.a
.PHONY: all-runtimed
libasmrund.a: $(DOBJS)
rm -f libasmrund.a
$(ARCMD) rc libasmrund.a $(DOBJS)
$(RANLIB) libasmrund.a
libasmruni.a: $(IOBJS)
rm -f $@
$(ARCMD) rc $@ $^
$(RANLIB) $@
all-noprof:
all-prof: libasmrunp.a
libasmrunp.a: $(POBJS)
rm -f libasmrunp.a
$(ARCMD) rc libasmrunp.a $(POBJS)
$(RANLIB) libasmrunp.a
all-noshared:
all-shared: libasmrun_pic.a libasmrun_shared.so
libasmrun_pic.a: $(PICOBJS)
rm -f libasmrun_pic.a
$(ARCMD) rc libasmrun_pic.a $(PICOBJS)
$(RANLIB) libasmrun_pic.a
libasmrun_shared.so: $(PICOBJS)
$(MKDLL) -o libasmrun_shared.so $(PICOBJS) $(NATIVECCLIBS)
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 finalise.c meta.c custom.c main.c globroots.c \
$(UNIX_OR_WIN32).c dynlink.c signals.c debugger.c startup_aux.c \
backtrace.c afl.c
INSTALL_LIBDIR=$(DESTDIR)$(LIBDIR)
install::
cp libasmrun.a $(INSTALL_LIBDIR)/libasmrun.a
cd $(INSTALL_LIBDIR); $(RANLIB) libasmrun.a
.PHONY: install-default
CC=$(NATIVECC)
ifeq "$(RUNTIMED)" "runtimed"
install::
cp libasmrund.a $(INSTALL_LIBDIR)/libasmrund.a
cd $(INSTALL_LIBDIR); $(RANLIB) libasmrund.a
ifeq "$(UNIX_OR_WIN32)" "win32"
LN = cp
else
LN = ln -s
endif
FLAGS=\
-I../byterun \
-DNATIVE_CODE -DTARGET_$(ARCH)
ifeq "$(UNIX_OR_WIN32)" "unix"
FLAGS += -DMODEL_$(MODEL)
endif
FLAGS += -DSYS_$(SYSTEM) \
$(NATIVECCCOMPOPTS) $(IFLEXDIR) \
$(LIBUNWIND_INCLUDE_FLAGS)
ifeq "$(TOOLCHAIN)" "msvc"
DFLAGS=$(FLAGS) -DDEBUG
PFLAGS=$(FLAGS) -DPROFILING $(NATIVECCPROFOPTS)
OUTPUTOBJ = -Fo
ASMOBJS=$(ARCH)nt.$(O)
else
DFLAGS=$(FLAGS) -g -DDEBUG
PFLAGS=$(FLAGS) -pg -DPROFILING $(NATIVECCPROFOPTS)
OUTPUTOBJ = -o
ASMOBJS=$(ARCH).$(O)
endif
IFLAGS=$(FLAGS) -DCAML_INSTR
PICFLAGS=$(FLAGS) $(SHAREDCCCOMPOPTS)
ASPPFLAGS = -DSYS_$(SYSTEM)
ifeq "$(UNIX_OR_WIN32)" "unix"
ASPPFLAGS += -DMODEL_$(MODEL)
CFLAGS=$(FLAGS) -g
else
CFLAGS=$(FLAGS)
endif
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) $(UNIX_OR_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) spacetime.$(O) spacetime_snapshot.$(O) \
spacetime_offline.$(O) afl.$(O)
OBJS=$(COBJS) $(ASMOBJS)
DOBJS=$(COBJS:.$(O)=.d.$(O)) $(ASMOBJS)
IOBJS=$(COBJS:.$(O)=.i.$(O)) $(ASMOBJS)
POBJS=$(COBJS:.$(O)=.p.$(O)) $(ASMOBJS:.$(O)=.p.$(O))
PICOBJS=$(COBJS:.$(O)=.pic.$(O)) $(ASMOBJS:.$(O)=.pic.$(O))
TARGETS = libasmrun.$(A)
ifeq "$(RUNTIMED)" "true"
TARGETS += libasmrund.$(A)
endif
ifeq "$(RUNTIMEI)" "true"
install::
cp libasmruni.a $(INSTALL_LIBDIR)/libasmruni.a
cd $(INSTALL_LIBDIR); $(RANLIB) libasmruni.a
TARGETS += libasmruni.$(A)
endif
ifeq "$(PROFILING)" "true"
install::
cp libasmrunp.a $(INSTALL_LIBDIR)/libasmrunp.a
TARGETS += libasmrunp.$(A)
endif
ifeq "$(SHARED)" "shared"
install::
cp libasmrun_pic.a $(INSTALL_LIBDIR)/libasmrun_pic.a
cd $(INSTALL_LIBDIR); $(RANLIB) libasmrun_pic.a
cp libasmrun_shared.so $(INSTALL_LIBDIR)/libasmrun_shared.so
ifeq "$(UNIX_OR_WIN32)" "unix"
ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
TARGETS += libasmrun_pic.$(A) libasmrun_shared.$(SO)
endif
endif
.PHONY: all
all: $(TARGETS)
libasmrun.$(A): $(OBJS)
$(call MKLIB,$@, $^)
libasmrund.$(A): $(DOBJS)
$(call MKLIB,$@, $^)
libasmruni.$(A): $(IOBJS)
$(call MKLIB,$@, $^)
libasmrunp.$(A): $(POBJS)
$(call MKLIB,$@, $^)
libasmrun_pic.$(A): $(PICOBJS)
$(call MKLIB,$@, $^)
libasmrun_shared.$(SO): $(PICOBJS)
$(MKDLL) -o $@ $^ $(NATIVECCLIBS)
.PHONY: install
install:
cp $(TARGETS) "$(INSTALL_LIBDIR)"
$(LINKEDFILES): %.c: ../byterun/%.c
ln -s ../byterun/$*.c $*.c
$(LN) $< $@
clean::
rm -f $(LINKEDFILES)
%.d.$(O): %.c
$(CC) -c $(DFLAGS) $(OUTPUTOBJ)$@ $<
%.d.o: %.c
$(CC) -c $(DFLAGS) -o $@ $<
%.i.$(O): %.c
$(CC) -c $(IFLAGS) $(OUTPUTOBJ)$@ $<
%.i.o : %.c
$(CC) -c $(IFLAGS) -o $@ $<
%.p.$(O): %.c
$(CC) -c $(PFLAGS) $(OUTPUTOBJ)$@ $<
%.p.o: %.c
$(CC) -c $(PFLAGS) -o $@ $<
%.pic.$(O): %.c
$(CC) -c $(PICFLAGS) $(OUTPUTOBJ)$@ $<
%.pic.o: %.c
$(CC) -c $(PICFLAGS) -o $@ $<
%.$(O): %.c
$(CC) $(CFLAGS) -c $<
%.o: %.S
$(ASPP) -DSYS_$(SYSTEM) -DMODEL_$(MODEL) -o $@ $< || \
$(ASPP) $(ASPPFLAGS) -o $@ $< || \
{ echo "If your assembler produced syntax errors, it is probably";\
echo "unhappy with the preprocessor. Check your assembler, or";\
echo "try producing $*.o by hand.";\
exit 2; }
%.p.o: %.S
$(ASPP) -DSYS_$(SYSTEM) -DMODEL_$(MODEL) $(ASPPPROFFLAGS) -o $@ $<
$(ASPP) $(ASPPFLAGS) $(ASPPPROFFLAGS) -o $@ $<
%.pic.o: %.S
$(ASPP) -DSYS_$(SYSTEM) -DMODEL_$(MODEL) $(SHAREDCCCOMPOPTS) -o $@ $<
$(ASPP) $(ASPPFLAGS) $(SHAREDCCCOMPOPTS) -o $@ $<
%.o: %.s
$(ASPP) -DSYS_$(SYSTEM) -o $@ $<
%.obj: %.asm
$(ASM)$@ $<
%.p.o: %.s
$(ASPP) -DSYS_$(SYSTEM) $(ASPPPROFFLAGS) -o $@ $<
%.pic.obj: %.asm
$(ASM)$@ $<
%.pic.o: %.s
$(ASPP) -DSYS_$(SYSTEM) $(SHAREDCCCOMPOPTS) -o $@ $<
.PHONY: clean
clean:
rm -f $(LINKEDFILES)
rm -f *.$(O) *.$(A) *.$(SO)
clean::
rm -f *.o *.a *.so *~
.PHONY: distclean
distclean: clean
rm -r *~
depend: $(COBJS:.o=.c) ${LINKEDFILES}
ifneq "$(TOOLCHAIN)" "msvc"
.PHONY: depend
depend: $(COBJS:.$(O)=.c) $(LINKEDFILES)
$(CC) -MM $(FLAGS) *.c > .depend
$(CC) -MM $(FLAGS) -DPROFILING *.c | sed -e 's/\.o/.p.o/' >> .depend
$(CC) -MM $(FLAGS) -DDEBUG *.c | sed -e 's/\.o/.d.o/' >> .depend
$(CC) -MM $(FLAGS) -DCAML_INSTR *.c | sed -e 's/\.o/.i.o/' >> .depend
$(CC) -MM $(FLAGS) -DDEBUG *.c | sed -e 's/\.o/.d.o)/' >> .depend
$(CC) -MM $(FLAGS) -DCAML_INSTR *.c | sed -e 's/\.o/.i.o' >> .depend
endif
ifeq "$(UNIX_OR_WIN32)" "win32"
.depend.nt: .depend
sed -e 's/\.o/.$(O)/g' .depend > .depend.nt
include .depend.nt
else
include .depend
endif

View File

@ -13,62 +13,4 @@
#* *
#**************************************************************************
include ../config/Makefile
include Makefile.shared
CC=$(NATIVECC)
CFLAGS=-I../byterun -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) \
$(NATIVECCCOMPOPTS) $(IFLEXDIR)
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
include Makefile

View File

@ -1,33 +0,0 @@
#**************************************************************************
#* *
#* 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. *
#* *
#**************************************************************************
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) $(UNIX_OR_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) spacetime.$(O) spacetime_snapshot.$(O) \
spacetime_offline.$(O) afl.$(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 finalise.c meta.c custom.c main.c globroots.c \
$(UNIX_OR_WIN32).c dynlink.c signals.c debugger.c startup_aux.c backtrace.c \
afl.c

View File

@ -24,7 +24,9 @@ DOBJS=$(OBJS:.o=.d.o) instrtrace.d.o
IOBJS=$(OBJS:.o=.i.o)
PICOBJS=$(OBJS:.o=.pic.o)
all:: all-$(SHARED)
ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
all:: libcamlrun_pic.a libcamlrun_shared.so
endif
ocamlrun$(EXE): libcamlrun.a prims.o
$(MKEXE) $(BYTECCLINKOPTS) -o ocamlrun$(EXE) \
@ -49,12 +51,6 @@ libcamlruni.a: $(IOBJS)
$(ARCMD) rc $@ $^
$(RANLIB) $@
all-noshared:
.PHONY: all-noshared
all-shared: libcamlrun_pic.a libcamlrun_shared.so
.PHONY: all-shared
libcamlrun_pic.a: $(PICOBJS)
$(ARCMD) rc libcamlrun_pic.a $(PICOBJS)
$(RANLIB) libcamlrun_pic.a
@ -62,16 +58,12 @@ libcamlrun_pic.a: $(PICOBJS)
libcamlrun_shared.so: $(PICOBJS)
$(MKDLL) -o libcamlrun_shared.so $(PICOBJS) $(BYTECCLIBS)
install:: install-$(SHARED)
install-noshared:
.PHONY: install-noshared
install-shared:
install::
ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
cp libcamlrun_shared.so "$(INSTALL_LIBDIR)/libcamlrun_shared.so"
cp libcamlrun_pic.a "$(INSTALL_LIBDIR)/libcamlrun_pic.a"
cd "$(INSTALL_LIBDIR)"; $(RANLIB) libcamlrun_pic.a
.PHONY: install-shared
endif
clean::
rm -f libcamlrun_shared.so libcamlrun_pic.a

View File

@ -34,15 +34,15 @@ PRIMS=\
signals.c str.c sys.c terminfo.c callback.c weak.c finalise.c stacks.c \
dynlink.c backtrace_prim.c backtrace.c spacetime.c afl.c
all:: ocamlrun$(EXE) ld.conf libcamlrun.$(A) all-$(RUNTIMED) primitives
ifeq "$(RUNTIMED)" "true"
RUNTIMEDTARGETS=ocamlrund$(EXE) libcamlrund.$(A)
else
RUNTIMEDTARGETS=
endif
all:: ocamlrun$(EXE) ld.conf libcamlrun.$(A) $(RUNTIMEDTARGETS) primitives
.PHONY: all
all-noruntimed:
.PHONY: all-noruntimed
all-runtimed: ocamlrund$(EXE) libcamlrund.$(A)
.PHONY: all-runtimed
ifeq "$(RUNTIMEI)" "true"
all:: ocamlruni$(EXE) libcamlruni.$(A)
endif
@ -70,19 +70,15 @@ install::
cp ld.conf "$(INSTALL_LIBDIR)/ld.conf"
.PHONY: install
install:: install-$(RUNTIMED)
install-noruntimed:
.PHONY: install-noruntimed
install::
ifeq "$(RUNTIMED)" "true"
# TODO: when cross-compiling, do not install ocamlrund
# it doesn't hurt to install it, but it's useless and might be confusing
# because it's an executable for the target machine, while we're installing
# binaries for the host.
install-runtimed:
cp ocamlrund$(EXE) "$(INSTALL_BINDIR)/ocamlrund$(EXE)"
cp libcamlrund.$(A) "$(INSTALL_LIBDIR)/libcamlrund.$(A)"
.PHONY: install-runtimed
endif
ifeq "$(RUNTIMEI)" "true"
install::

View File

@ -82,7 +82,7 @@ SYSTHREAD_SUPPORT=true
EXTRALIBS=
NATDYNLINK=true
CMXS=cmxs
RUNTIMED=noruntimed
RUNTIMED=false
ASM_CFI_SUPPORTED=false
UNIX_OR_WIN32=win32
UNIXLIB=win32unix

View File

@ -82,7 +82,7 @@ SYSTHREAD_SUPPORT=true
EXTRALIBS=
NATDYNLINK=true
CMXS=cmxs
RUNTIMED=noruntimed
RUNTIMED=false
ASM_CFI_SUPPORTED=false
UNIX_OR_WIN32=win32
UNIXLIB=win32unix

View File

@ -76,7 +76,7 @@ SYSTHREAD_SUPPORT=true
EXTRALIBS=
CMXS=cmxs
NATDYNLINK=true
RUNTIMED=noruntimed
RUNTIMED=false
ASM_CFI_SUPPORTED=false
UNIX_OR_WIN32=win32
UNIXLIB=win32unix

View File

@ -75,7 +75,7 @@ CC_PROFILE=
SYSTHREAD_SUPPORT=true
CMXS=cmxs
NATDYNLINK=true
RUNTIMED=noruntimed
RUNTIMED=false
ASM_CFI_SUPPORTED=false
UNIX_OR_WIN32=win32
UNIXLIB=win32unix

11
configure vendored
View File

@ -45,7 +45,7 @@ pthread_wanted=yes
dl_defs=''
verbose=no
with_curses=yes
debugruntime=noruntimed
debugruntime=false
with_instrumented_runtime=false
with_sharedlibs=yes
partialld="ld -r"
@ -169,7 +169,7 @@ while : ; do
-verbose|--verbose)
verbose=yes;;
-with-debug-runtime|--with-debug-runtime)
debugruntime=runtimed;;
debugruntime=true;;
-with-instrumented-runtime|--with-instrumented-runtime)
with_instrumented_runtime=true;;
-no-debugger|--no-debugger)
@ -2027,11 +2027,6 @@ echo "MKEXEDEBUGFLAG=$mkexedebugflag" >> Makefile
echo "MKDLL=$mksharedlib" >> Makefile
echo "MKMAINDLL=$mkmaindll" >> Makefile
echo "RUNTIMED=${debugruntime}" >>Makefile
if $shared_libraries_supported; then
echo "SHARED=shared" >>Makefile
else
echo "SHARED=noshared" >>Makefile
fi
echo "RUNTIMEI=${with_instrumented_runtime}" >>Makefile
echo "WITH_DEBUGGER=${with_debugger}" >>Makefile
echo "WITH_OCAMLDOC=${with_ocamldoc}" >>Makefile
@ -2182,7 +2177,7 @@ else
inf "Source-level replay debugger: not supported"
fi
if test "$debugruntime" = "runtimed"; then
if $debugruntime; then
inf "Debug runtime will be compiled and installed"
fi

View File

@ -53,7 +53,7 @@ OTHERS=list.cmo char.cmo bytes.cmo string.cmo sys.cmo \
.PHONY: all
all: stdlib.cma std_exit.cmo camlheader target_camlheader camlheader_ur
ifeq "$(RUNTIMED)" "runtimed"
ifeq "$(RUNTIMED)" "true"
all: camlheaderd
endif
@ -86,7 +86,7 @@ install::
"$(INSTALL_LIBDIR)"
cp target_camlheader "$(INSTALL_LIBDIR)/camlheader"
ifeq "$(RUNTIMED)" "runtimed"
ifeq "$(RUNTIMED)" "true"
install::
cp target_camlheaderd $(INSTALL_LIBDIR)
endif

View File

@ -69,7 +69,7 @@ plugin2.cmx: api.cmx plugin.cmi plugin.cmx
@mv plugin.cmx.bak plugin.cmx
sub/api.so: sub/api.cmi sub/api.ml
@cd sub; $(OCAMLOPT) -c $(SHARED) api.ml
@cd sub; $(OCAMLOPT) -c $(SUPPORTS_SHARED_LIBRARIES) api.ml
sub/api.cmi: sub/api.mli
@cd sub; $(OCAMLOPT) -c -opaque api.mli