summaryrefslogtreecommitdiff
path: root/otherlibs/labltk/support/Makefile
blob: 4e7e6c413ae0b3f02e6b298360b67b98dcb1b3f5 (plain)
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
include Makefile.common

all: support.cmo rawwidget.cmo widget.cmo protocol.cmo \
     textvariable.cmo timer.cmo fileevent.cmo camltkwrap.cmo \
     lib$(LIBNAME).a

opt: support.cmx rawwidget.cmx widget.cmx protocol.cmx \
     textvariable.cmx timer.cmx fileevent.cmx camltkwrap.cmx \
     lib$(LIBNAME).a

COBJS=cltkCaml.o cltkUtf.o cltkEval.o cltkEvent.o cltkFile.o cltkMain.o \
      cltkMisc.o cltkTimer.o cltkVar.o cltkWait.o cltkImg.o

CCFLAGS=-I../../../byterun $(TK_DEFS) $(SHAREDCCCOMPOPTS)

COMPFLAGS=-I $(OTHERS)/unix

lib$(LIBNAME).a : $(COBJS)
	$(MKLIB) -o $(LIBNAME) $(COBJS) $(TK_LINK)

PUB=fileevent.cmi fileevent.mli \
    protocol.cmi protocol.mli \
    textvariable.cmi textvariable.mli \
    timer.cmi timer.mli \
    rawwidget.cmi rawwidget.mli \
    widget.cmi widget.mli

install: lib$(LIBNAME).a $(PUB)
	if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
	cp $(PUB) lib$(LIBNAME).a $(INSTALLDIR)
	cd $(INSTALLDIR); $(RANLIB) lib$(LIBNAME).a
	cd $(INSTALLDIR); chmod 644 $(PUB) lib$(LIBNAME).a
	if test -f dll$(LIBNAME).so; then \
	   cp dll$(LIBNAME).so $(INSTALLDIR)/dll$(LIBNAME).so; \
	   chmod 644 $(INSTALLDIR)/dll$(LIBNAME).so; fi

clean : 
	rm -f *.cm* *.o *.a *.so

.SUFFIXES :
.SUFFIXES : .mli .ml .cmi .cmo .cmx .mlp .c .o

.mli.cmi:
	$(CAMLCOMP) $(COMPFLAGS) $<

.ml.cmo:
	$(CAMLCOMP) $(COMPFLAGS) $<

.ml.cmx:
	$(CAMLOPT) -c $(COMPFLAGS) $<

.c.o:
	$(BYTECC) $(BYTECCCOMPOPTS) $(CCFLAGS) -c $<

depend:
	$(CAMLDEP) *.mli *.ml > .depend

$(COBJS): $(TOPDIR)/config/Makefile camltk.h

include .depend