~ubuntu-branches/ubuntu/natty/lua-gtk/natty

« back to all changes in this revision

Viewing changes to src/gnome/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Enrico Tassi
  • Date: 2009-05-17 18:16:21 UTC
  • mfrom: (1.2.1 upstream) (4.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090517181621-9kmdd82nxg54jsio
* new upstream snapshot comprising many more GNOME libraries:
    Gtk, GDK, GLib, Pango, Atk, Libxml2, Cairo, Clutter, Gtkhtml, 
    GtkSourceView, Gio, Gtkspell and GConf. 
* new upstream release includes a new configure script written in Lua,
  no more bashisms there (Closes: #507205)
* renamed binary packages to liblua5.1-gnome-*
* updated standards-version to 3.8.1, no changes needed
* patch to load .so.* version of libraries and not .so (that was requiring
  -dev packages) (Closes: #522087)
* removed redundant Architecture line from the source stanza of control
  (Closes: #498120)
* updated copyright file, Wolfgang Oertl holds it for 2009 too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
MODULE  :=gnome
 
3
COREMODULE:=1
 
4
SRC     :=init types boxed data enum voidptr call closure gvalue lang \
 
5
        debug object object_types object_meta \
 
6
        hash-lookup hash-functions hash-simple
 
7
CLEAN   =*.$O file2c override.luac ffi-types test-* lg_ffi.h cmph_types.h
 
8
 
 
9
all-gnome: build-tests module_$(MODULE) dummy
 
10
 
 
11
include script/Makefile.common
 
12
include src/hash/Makefile.inc
 
13
 
 
14
BINDIR  :=build/$(ARCH)
 
15
LIBS    +=$(LIBFFI_LIB)
 
16
 
 
17
ifeq ($(DYNLINK), 0)
 
18
  LIBS  +=$(GTK_LIBS)
 
19
endif
 
20
 
 
21
# XXX
 
22
# if DYNLINK==0, LIBS:=$(GTK_LIBS)
 
23
 
 
24
# ODLL  :=gnome$(DLLEXT)
 
25
 
 
26
# test that calling works properly.  For Win32, requires wine to be installed.
 
27
build-tests: ${ODIR}test-vararg-ok
 
28
 
 
29
${ODIR}test-%-ok: ${ODIR}test-%${EXESUFFIX}
 
30
        $H $(CROSS_RUN) $^ && touch $@
 
31
 
 
32
${ODIR}test-vararg${EXESUFFIX}: $(IDIR)/test-vararg.c
 
33
        $I
 
34
        $H $(CC) $(CFLAGS) -I $(ODIR) -Wall -o $@ $^
 
35
 
 
36
# rule to build the library.
 
37
 
 
38
${ODIR}debug.$(O): $(IDIR)/debug.c
 
39
        $I
 
40
        $H ${CC} ${CFLAGS} -I lua-5.1/src -c -o $@ $<
 
41
 
 
42
 
 
43
# -- ffi magic --
 
44
 
 
45
${ODIR}lg_ffi.h: ${ODIR}ffi-types
 
46
        $I
 
47
        $H ${ODIR}ffi-types > $@
 
48
 
 
49
${ODIR}ffi-types.$(O): $(IDIR)/ffi-types.c
 
50
        $I
 
51
        $H ${HOSTCC} ${CFLAGS} -o $@ -c $<
 
52
 
 
53
${ODIR}ffi-types: ${ODIR}ffi-types.$(O)
 
54
        $I
 
55
        $H ${HOSTCC} $(CFLAGS) -o $@ $< -lffi
 
56
 
 
57
# -- cmph hash functions --
 
58
 
 
59
$(ODIR)hash-cmph.$O: src/hash/hash-cmph.c
 
60
        $I
 
61
        $H $(CC) $(CFLAGS) -c -o $@ $<
 
62
 
 
63
${ODIR}hash-fch.$(O): src/hash/hash-fch.c
 
64
        $I
 
65
        $H ${CC} ${CMPH_CFLAGS} ${CFLAGS} -c -o $@ $<
 
66
 
 
67
${ODIR}hash-bdz.$(O): src/hash/hash-bdz.c
 
68
        $I
 
69
        $H ${CC} ${CMPH_CFLAGS} ${CFLAGS} -c -o $@ $<
 
70
 
 
71
${ODIR}hash-functions.$O: src/hash/hash-functions.c
 
72
        $I
 
73
        $H ${CC} ${CMPH_CFLAGS} ${CFLAGS} -c -o $@ $<
 
74
 
 
75
# -- hash generator helpers --
 
76
# these are not used to build this module, as no hash tables are used, but
 
77
# the other modules need this to build.
 
78
 
 
79
${ODIR}file2c: src/file2c.c
 
80
        $I
 
81
        $H ${HOSTCC} -o $@ $^
 
82
 
 
83
# -- special targets --
 
84
 
 
85
mrproper2: clean
 
86
        $H rm -f ${ODIR}types.c $(ODIR)fundamentals.c \
 
87
                ${ODIR}hash-fch-* ${ODIR}config.* \
 
88
                ${ODIR}types.xml ${ODIR}ffi-ofs ${ODIR}link.[ch] \
 
89
                ${ODIR}lg_ffi.h ${ODIR}cmph_types.h \
 
90
                ${ODIR}test-*-ok ${ODIR}test-*${EXESUFFIX}
 
91
install: all
 
92
        # you need to be root for this!
 
93
        mkdir -p $(INDIR1)
 
94
        $(LIBINSTALL) ${ODIR}${ODLL} $(INDIR1)/${ODLL}
 
95
        $(LIBFINAL) $(INDIR1)
 
96
        mkdir -p $(INDIR2)/gtk
 
97
        cp -a lib $(INDIR2)/gtk/
 
98
 
 
99
# source tar file
 
100
tar:
 
101
        (cd ..; ln -s lua-gtk lua-gtk-${VERSION}; \
 
102
        tar czvfh tar/lua-gtk-${VERSION}.tar.gz \
 
103
                --exclude build --exclude CVS --exclude mingw \
 
104
                --exclude tags --exclude ".*.swp" --exclude attic \
 
105
                --exclude private --exclude win32 --exclude funclist \
 
106
                lua-gtk-${VERSION}; \
 
107
        rm lua-gtk-${VERSION})
 
108
 
 
109
help:
 
110
        @echo "Usage: make.sh [architecture] [target]"
 
111
        @echo "  architecture:  optional, may be linux-i386, linux-amd64 or win32-i386"
 
112
        @echo "  target: optional, default is all, also known:"
 
113
        @echo "    help, doc, install, clean, mrproper and maybe more."
 
114
 
 
115
funclist: all $(ODIR)functions.txt
 
116
        $H script/funclist.lua $(ODIR)functions.txt > $@
 
117
 
 
118
# -- dependencies --
 
119
 
 
120
DEP     +=$(IDIR)/luagnome.h include/common.h
 
121
 
 
122
${ODIR}call.$O: ${ODIR}lg_ffi.h $(DEP)
 
123
${ODIR}closure.$O: $(DEP)
 
124
${ODIR}data.$O: $(DEP)
 
125
${ODIR}debug.$O: $(DEP)
 
126
${ODIR}init.$O: $(DEP) include/module.h
 
127
${ODIR}boxed.$O: $(DEP)
 
128
${ODIR}types.$O: $(DEP)
 
129
${ODIR}gvalue.$O: $(DEP)
 
130
${ODIR}hash-functions.$O: $(DEP) include/lg-hash.h
 
131
${ODIR}hash-cmph.$O: $(DEP) include/lg-hash.h
 
132
${ODIR}hash-fch.$O: $(DEP) include/lg-hash.h
 
133
${ODIR}hash-bdz.$O: $(DEP) include/lg-hash.h
 
134
${ODIR}interface.$O: $(DEP)
 
135
${ODIR}override.$O: $(DEP)
 
136
${ODIR}types.$O: $(DEP) $(ODIR)fundamentals.c ${ODIR}lg_ffi.h
 
137
${ODIR}enum.$O: $(DEP)
 
138
${ODIR}voidptr.$O: $(DEP)
 
139
${ODIR}object.$O: $(DEP)
 
140
${ODIR}object_meta.$O: $(DEP)
 
141
${ODIR}object_types.$O: $(DEP)
 
142
 
 
143