]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/ocaml/contrib/win32caml/Makefile
Update
[l4.git] / l4 / pkg / ocaml / ocaml / contrib / win32caml / Makefile
1 #########################################################################
2 #                                                                       #
3 #                            Objective Caml                             #
4 #                                                                       #
5 #            Xavier Leroy, projet Cristal, INRIA Rocquencourt           #
6 #                                                                       #
7 #   Copyright 2001 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 8521 2007-11-15 13:21:15Z frisch $
15
16 include ../config/Makefile
17
18 CC=$(BYTECC)
19 CFLAGS=$(BYTECCCOMPOPTS)
20
21 OBJS=startocaml.$(O) ocamlres.$(O) ocaml.$(O) menu.$(O) \
22   history.$(O) editbuffer.$(O)
23
24 LIBS=$(call SYSLIB,kernel32) $(call SYSLIB,advapi32) $(call SYSLIB,gdi32) \
25      $(call SYSLIB,user32) $(call SYSLIB,comdlg32) $(call SYSLIB,comctl32)
26
27 all: ocamlwin.exe
28
29 ocamlwin.exe: $(OBJS)
30         $(MKEXE) -o ocamlwin.exe $(OBJS) $(LIBS) $(EXTRALIBS) -subsystem windows
31
32 ocamlres.$(O): ocaml.rc ocaml.ico
33 ifeq ($(TOOLCHAIN),msvc)
34         rc ocaml.rc
35 ifeq ($(ARCH),amd64)
36         cvtres /nologo /machine:amd64 /out:$@ ocaml.res
37 else
38         cvtres /nologo /machine:ix86 /out:$@ ocaml.res
39 endif
40         rm -f ocaml.res
41 endif
42 ifeq ($(TOOLCHAIN),mingw)
43         windres -i ocaml.rc -o $@
44 endif
45
46 $(OBJS): inria.h inriares.h history.h editbuffer.h
47
48 clean:
49         rm -f ocamlwin.exe *.$(O) *.pdb ocamlwin.ilk
50
51 install:
52         cp ocamlwin.exe $(PREFIX)/OCamlWin.exe
53
54 .SUFFIXES: .c .$(O)
55
56 .c.$(O):
57         $(CC) $(CFLAGS) -c $*.c