From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Sun, 17 Aug 2008 13:21:22 +0000 (+0100) Subject: Separate rules for building bytecode & native code versions. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=48a85384daa4089f6d310293ab3f8d713740f962;p=virt-mem.git Separate rules for building bytecode & native code versions. --- diff --git a/Makefile.in b/Makefile.in index 0884557..03a00fb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -45,7 +45,9 @@ endif TARGETS = $(MANPAGES) $(TEXTMANPAGES) -all: $(TARGETS) +all: byte opt + +byte opt: $(TARGETS) for d in $(SUBDIRS_NOT_PO); do \ $(MAKE) -C $$d $@; \ if [ $$? -ne 0 ]; then exit 1; fi; \ diff --git a/dmesg/Makefile.in b/dmesg/Makefile.in index 38fca98..00e4e0e 100644 --- a/dmesg/Makefile.in +++ b/dmesg/Makefile.in @@ -44,9 +44,11 @@ OCAMLDEPFLAGS = $(SYNTAX) OBJS = virt_dmesg.cmo XOBJS = virt_dmesg.cmx -TARGETS = $(OBJS) $(XOBJS) +all: byte opt -all: $(TARGETS) +byte: virt_dmesg.cmo + +opt: virt_dmesg.cmx install: diff --git a/extract/codegen/Makefile.in b/extract/codegen/Makefile.in index b7d1632..92c131f 100644 --- a/extract/codegen/Makefile.in +++ b/extract/codegen/Makefile.in @@ -41,7 +41,11 @@ OBJS = pahole_parser.cmo \ compile_kerneldb.cmo XOBJS = $(OBJS:.cmo=.cmx) -all: $(TARGETS) +all: byte opt + +byte: + +opt: $(TARGETS) compile-kerneldb.opt: $(XOBJS) ocamlfind ocamlopt \ diff --git a/extract/fedora-koji/Makefile.in b/extract/fedora-koji/Makefile.in index 9af56f3..3154a4f 100644 --- a/extract/fedora-koji/Makefile.in +++ b/extract/fedora-koji/Makefile.in @@ -43,7 +43,11 @@ endif OBJS = fedora_koji_download_kernels.cmo XOBJS = $(OBJS:.cmo=.cmx) -all: $(TARGETS) +all: byte opt + +byte: + +opt: $(TARGETS) fedora-koji-download-kernels.opt: $(XOBJS) ocamlfind ocamlopt \ diff --git a/ifconfig/Makefile.in b/ifconfig/Makefile.in index 94957d1..861db51 100644 --- a/ifconfig/Makefile.in +++ b/ifconfig/Makefile.in @@ -46,7 +46,11 @@ XOBJS = virt_ifconfig.cmx TARGETS = $(OBJS) $(XOBJS) -all: $(TARGETS) +all: byte opt + +byte: virt_ifconfig.cmo + +opt: virt_ifconfig.cmx install: diff --git a/lib/Makefile.in b/lib/Makefile.in index bf1e36a..a21ebf7 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -45,8 +45,6 @@ OCAMLOPTLIBS = -linkpkg OCAMLDEPFLAGS = $(SYNTAX) -TARGETS = virt_mem.cma virt_mem.cmxa - OBJS = virt_mem_gettext.cmo \ virt_mem_version.cmo \ virt_mem_kernels.cmo \ @@ -64,7 +62,11 @@ OBJS = virt_mem_gettext.cmo \ XOBJS = $(OBJS:%.cmo=%.cmx) -all: $(TARGETS) +all: byte opt + +byte: virt_mem.cma + +opt: virt_mem.cmxa virt_mem.cma: $(OBJS) ocamlmklib -o virt_mem $^ diff --git a/mem/Makefile.in b/mem/Makefile.in index f05c763..03fe0e0 100644 --- a/mem/Makefile.in +++ b/mem/Makefile.in @@ -47,12 +47,14 @@ OCAMLDOCFLAGS = -html -sort $(OCAMLCPACKAGES) $(SYNTAX) OCAMLDEPFLAGS = $(SYNTAX) -TARGETS = virt-mem virt-mem.opt - OBJS = $(shell for t in $(TOOLS); do echo ../$$t/virt_$$t.cmo; done) virt_mem_main.cmo XOBJS = $(OBJS:%.cmo=%.cmx) -all: $(TARGETS) +all: byte opt + +byte: virt-mem + +opt: virt-mem.opt virt-mem: ../lib/virt_mem.cma $(OBJS) ocamlfind ocamlc \ diff --git a/ps/Makefile.in b/ps/Makefile.in index 8e0fc5d..12edaef 100644 --- a/ps/Makefile.in +++ b/ps/Makefile.in @@ -44,9 +44,11 @@ OCAMLDEPFLAGS = $(SYNTAX) OBJS = virt_ps.cmo XOBJS = virt_ps.cmx -TARGETS = $(OBJS) $(XOBJS) +all: byte opt -all: $(TARGETS) +byte: virt_ps.cmo + +opt: virt_ps.cmx install: diff --git a/uname/Makefile.in b/uname/Makefile.in index 5a21e99..de8452b 100644 --- a/uname/Makefile.in +++ b/uname/Makefile.in @@ -44,9 +44,11 @@ OCAMLDEPFLAGS = $(SYNTAX) OBJS = virt_uname.cmo XOBJS = virt_uname.cmx -TARGETS = $(OBJS) $(XOBJS) +all: byte opt -all: $(TARGETS) +byte: virt_uname.cmo + +opt: virt_uname.cmx install: