]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/build/asmrun/Makefile
update
[l4.git] / l4 / pkg / ocaml / build / asmrun / Makefile
1 PKGDIR  ?= ../..
2 L4DIR   ?= $(PKGDIR)/../..
3
4 # no .so as amd64.S doesn't seem to like it
5 TARGET      = libocaml_asmrun.a
6 PC_FILENAME = libocaml_asmrun
7
8 CONTRIBDIR = $(PKGDIR)/contrib
9
10 # order matter, i.e. asmrun needs to go before byterun
11 vpath %.S $(CONTRIBDIR)/asmrun
12 vpath %.c $(CONTRIBDIR)/asmrun
13 vpath %.c $(CONTRIBDIR)/byterun
14
15 PRIVATE_INCDIR = $(SRC_DIR)/../byterun \
16                  $(CONTRIBDIR)/byterun \
17                  $(SRC_DIR) \
18                  $(SRC_DIR)/../ARCH-$(ARCH)/config
19
20 OCAML_ARCH_FILE_x86   = i386
21 OCAML_ARCH_FILE_amd64 = amd64
22 OCAML_ARCH_FILE_arm   = arm
23 OCAML_ARCH_FILE_ppc32 = power-elf
24 OCAML_ARCH_FILE_sparc = sparc
25 OCAML_ARCH_FILE       = $(OCAML_ARCH_FILE_$(ARCH))
26
27 NATIVECCCOMPOPTS=-Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT
28
29 DEFINES_x86   = -DTARGET_i386 -DSYS_linux_elf
30 DEFINES_amd64 = -DTARGET_amd64 -DSYS_linux
31 DEFINES_arm   = -DTARGET_arm
32 DEFINES_ppc32 = -DTARGET_power -DSYS_elf
33 DEFINES_sparc = -DTARGET_sparc
34 DEFINES       = -DCAML_NAME_SPACE -DNATIVE_CODE \
35                 $(DEFINES_$(ARCH)) $(NATIVECCCOMPOPTS)
36
37 # arm.s contains some fp instructions, set version explicitely to have it
38 # compile, it will trap at runtime as nobody will emulate it
39 ASFLAGS_arm.S     = -mfpu=fpa -mabi=apcs-gnu
40
41 SRC_C = startup.c main.c fail.c roots.c globroots.c signals.c signals_asm.c \
42         misc.c freelist.c major_gc.c minor_gc.c memory.c alloc.c compare.c \
43         ints.c floats.c str.c array.c io.c extern.c intern.c hash.c sys.c \
44         parsing.c gc_ctrl.c terminfo.c md5.c obj.c lexing.c printexc.c \
45         callback.c weak.c compact.c finalise.c custom.c unix.c backtrace.c \
46         natdynlink.c
47 SRC_S = $(OCAML_ARCH_FILE).S
48
49 include $(L4DIR)/mk/lib.mk
50
51 # contrib code: hide all the warnings
52 CFLAGS := $(CFLAGS) -Wno-missing-prototypes -Wno-missing-declarations \
53           -Wno-sign-compare -Wno-unused -Wno-implicit \
54           -Wno-strict-prototypes