]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/ocaml/contrib/asmrun/Makefile.nt
Update
[l4.git] / l4 / pkg / ocaml / ocaml / contrib / asmrun / Makefile.nt
1 #########################################################################
2 #                                                                       #
3 #                            Objective Caml                             #
4 #                                                                       #
5 #            Xavier Leroy, projet Cristal, INRIA Rocquencourt           #
6 #                                                                       #
7 #   Copyright 1999 Institut National de Recherche en Informatique et    #
8 #   en Automatique.  All rights reserved.  This file is distributed     #
9 #   under the terms of the GNU Library General Public License, with     #
10 #   the special exception on linking described in file ../LICENSE.      #
11 #                                                                       #
12 #########################################################################
13
14 # $Id: Makefile.nt 8521 2007-11-15 13:21:15Z frisch $
15
16 include ../config/Makefile
17
18 CC=$(NATIVECC)
19 CFLAGS=-I../byterun -DNATIVE_CODE -DTARGET_$(ARCH) -DSYS_$(SYSTEM) $(NATIVECCCOMPOPTS)
20
21 COBJS=startup.$(O) main.$(O) fail.$(O) roots.$(O) signals.$(O) signals_asm.$(O) \
22   misc.$(O) freelist.$(O) major_gc.$(O) minor_gc.$(O) memory.$(O) alloc.$(O) \
23   compare.$(O) ints.$(O) floats.$(O) str.$(O) array.$(O) io.$(O) extern.$(O) \
24   intern.$(O) hash.$(O) sys.$(O) parsing.$(O) gc_ctrl.$(O) terminfo.$(O) \
25   md5.$(O) obj.$(O) lexing.$(O) win32.$(O) printexc.$(O) callback.$(O) \
26   weak.$(O) compact.$(O) finalise.$(O) custom.$(O) globroots.$(O) \
27   backtrace.$(O) natdynlink.$(O)
28
29 LINKEDFILES=misc.c freelist.c major_gc.c minor_gc.c memory.c alloc.c array.c \
30   compare.c ints.c floats.c str.c io.c extern.c intern.c hash.c sys.c \
31   parsing.c gc_ctrl.c terminfo.c md5.c obj.c lexing.c printexc.c callback.c \
32   weak.c compact.c meta.c finalise.c custom.c main.c globroots.c \
33   dynlink.c signals.c
34
35 ifeq ($(TOOLCHAIN),mingw)
36 ASMOBJS=$(ARCH).o
37 else
38 ASMOBJS=$(ARCH)nt.obj
39 endif
40
41 OBJS=$(COBJS) $(ASMOBJS)
42
43 all: libasmrun.$(A)
44
45 libasmrun.$(A): $(OBJS)
46         $(call MKLIB,libasmrun.$(A), $(OBJS))
47
48 i386nt.obj: i386nt.asm
49         $(ASM)i386nt.obj i386nt.asm
50
51 amd64nt.obj: amd64nt.asm
52         $(ASM)amd64nt.obj amd64nt.asm
53
54 i386.o: i386.S
55         $(CC) -c -DSYS_$(SYSTEM) i386.S
56
57 install:
58         cp libasmrun.$(A) $(LIBDIR)
59
60 $(LINKEDFILES): %.c: ../byterun/%.c
61         cp ../byterun/$*.c $*.c
62
63 # Need special compilation rule so as not to do -I../byterun
64 win32.$(O): ../byterun/win32.c
65         $(CC) -c $(NATIVECCCOMPOPTS) -DNATIVE_CODE $(IFLEXDIR) ../byterun/win32.c
66
67 .SUFFIXES: .c .$(O)
68
69 .c.$(O):
70         $(CC) $(CFLAGS) -c $<
71
72 clean::
73         rm -f $(LINKEDFILES)
74
75 clean::
76         rm -f *.$(O) *.$(A) *~
77
78 .depend.nt: .depend
79         sed -e 's/\.o/.$(O)/g' .depend > .depend.nt
80
81 include .depend.nt