File: Makefile.orig

package info (click to toggle)
gd4o 1.0~alpha5-9
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,212 kB
  • sloc: xml: 1,618; ml: 1,136; ansic: 781; makefile: 85
file content (63 lines) | stat: -rw-r--r-- 1,403 bytes parent folder | download | duplicates (3)
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
# You might have to change these.
OCAMLC=ocamlc
OCAMLOPT=ocamlopt
OCAMLMKLIB=ocamlmklib
OCAMLLIB=`$(OCAMLC) -where`
CINCLUDES=-I$(OCAMLLIB) -I/usr/include 
CC=gcc

# If you don't have libjpeg, remove the -DHAVE_JPEG and -cclib -ljpeg parts of
# the following lines.
CFLAGS=$(CINCLUDES) -DHAVE_JPEG -W -Wall -Wno-unused
LIBS=-lgd -lpng -lz -ljpeg
OCAMLCFLAGS=-labels -unsafe
OCAMLOPTFLAGS=-inline 1

OPT_FILES=gd.cmxa
INSTALL_FILES=gd.cmi gd.cma libocamlgd.a dllocamlgd.so

.PHONY : all opt install install-opt clean realclean

all: gd.cma gdtest

opt: gd.cmxa gdtest.opt


install: all
	cp -f $(INSTALL_FILES) $(OCAMLLIB)

install-opt: all
	cp -f gd.cmxa libocamlgd.a $(OCAMLLIB)

gd.cma: gd.cmi gd.cmo gdstubs.o
	ocamlmklib -o gd gd.cmo gdstubs.o -oc ocamlgd $(LIBS)

gd.cmxa: gd.cmi gd.cmx gdstubs.o
	ocamlmklib -o gd gd.cmx gdstubs.o -oc ocamlgd $(LIBS)

gd.cmx: gd.cmi gd.ml
	$(OCAMLOPT) $(OCAMLCFLAGS) -c gd.ml

gd.cmo: gd.cmi gd.ml
	$(OCAMLC) $(OCAMLCFLAGS) -c gd.ml

gd.cmi: gd.mli
	$(OCAMLC) $(OCAMLCFLAGS) -c gd.mli

gdtest: gd.cma gdtest.cmo
	$(OCAMLC) -o gdtest -dllpath . gd.cma gdtest.cmo 

gdtest.opt: gd.cmxa gdtest.ml
	$(OCAMLOPT) $(OCAMLCFLAGS) -o gdtest.opt gd.cmxa gdtest.ml

gdstubs.o: gdstubs.c
	$(CC) $(CFLAGS) -c gdstubs.c

gdtest.cmo: gd.cmi gdtest.ml
	$(OCAMLC) $(OCAMLCFLAGS) -c gdtest.ml

clean :
	-rm -f *.cmi *.cmo *.cmx *.o

realclean : clean
	-rm -f *.a *.so *.cma *.cmxa