File: Makefile

package info (click to toggle)
ocamlsdl 0.9.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,608 kB
  • sloc: ansic: 3,311; sh: 3,103; ml: 2,111; makefile: 180; awk: 13
file content (63 lines) | stat: -rw-r--r-- 2,487 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#
# OCamlSDL - An ML interface to the SDL library
# Copyright (C) 1999  Frederic Brunel
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#

# $Id: Makefile,v 1.24 2010/04/19 21:01:14 oliv__a Exp $

all doc clean install:
	$(MAKE) -C src $@
.PHONY: all doc clean install

include makefile.platform
include makefile.config.$(OCAML_C_BACKEND)

ifeq ($(OCAML_C_BACKEND),gcc)
makefile.config.gcc : makefile.config.gcc.in configure
	$(error "please run ./configure or edit makefile.platform")
configure : configure.in
	aclocal -I support
	autoconf
endif

DISTSRC := AUTHORS COPYING INSTALL INSTALL.win32 README README.macosx NEWS \
           Makefile META.in \
           configure.in aclocal.m4 configure \
           makefile.platform.in makefile.config.gcc.in makefile.config.msvc makefile.rules \
           support/install-sh support/ocaml.m4 support/config.sub support/config.guess \
	   src/sdl*.ml src/sdl*.mli src/sdl*.c src/sdl*.h \
           src/common.c src/common.h src/mlsdl_main.c \
           src/config.h.in src/config.h.msvc \
	   src/Makefile src/.depend src/.depend_c \
           doc/ocamlsdl.texi doc/ocamlsdl.info doc/ocamlsdl-mingw.txt \
           doc/html xpm_to_ml

# hackish targets to build tarballs
dist : dist-zip dist-tgz
dist-zip : ../ocamlsdl-$(VERSION).zip
dist-tgz : ../ocamlsdl-$(VERSION).tar.gz
.PHONY : dist dist-zip dist-tgz
../ocamlsdl-$(VERSION).zip : $(DISTSRC)
	export DIRNAME=$${PWD##*/} ; \
	cd .. && mv $$DIRNAME ocamlsdl-$(VERSION) && \
        zip -9rl $(@F) $(addprefix ocamlsdl-$(VERSION)/,$(DISTSRC)) && \
	mv ocamlsdl-$(VERSION) $$DIRNAME 
../ocamlsdl-$(VERSION).tar.gz : $(DISTSRC)
	export DIRNAME=$${PWD##*/} ; \
	cd .. && mv $$DIRNAME ocamlsdl-$(VERSION) && \
	tar zcvf $(@F) $(addprefix ocamlsdl-$(VERSION)/,$(DISTSRC)) && \
	mv ocamlsdl-$(VERSION) $$DIRNAME