~ubuntu-branches/ubuntu/karmic/gtk-gnutella/karmic

« back to all changes in this revision

Viewing changes to src/ui/gtk/gtk2/Jmakefile

  • Committer: Bazaar Package Importer
  • Author(s): Anand Kumria
  • Date: 2005-08-04 11:32:05 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050804113205-q746i4lgo3rtlegn
Tags: 0.95.4-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Id: Jmakefile,v 1.5 2005/05/07 13:19:24 graaff Exp $
 
3
 *
 
4
 * Copyright (c) 2003, Raphael Manfredi
 
5
 *
 
6
 * Jmakefile for the GTK1 GUI.
 
7
 *
 
8
 *----------------------------------------------------------------------
 
9
 * This file is part of gtk-gnutella.
 
10
 *
 
11
 *  gtk-gnutella is free software; you can redistribute it and/or modify
 
12
 *  it under the terms of the GNU General Public License as published by
 
13
 *  the Free Software Foundation; either version 2 of the License, or
 
14
 *  (at your option) any later version.
 
15
 *
 
16
 *  gtk-gnutella is distributed in the hope that it will be useful,
 
17
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
19
 *  GNU General Public License for more details.
 
20
 *
 
21
 *  You should have received a copy of the GNU General Public License
 
22
 *  along with gtk-gnutella; if not, write to the Free Software
 
23
 *  Foundation, Inc.:
 
24
 *      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
25
 *----------------------------------------------------------------------
 
26
 */
 
27
 
 
28
;# $Id: Jmakefile,v 1.5 2005/05/07 13:19:24 graaff Exp $
 
29
 
 
30
;# Those files lie in the ../gtk-shared directory
 
31
REMOTE_GLADE_C = callbacks.c
 
32
REMOTE_GLADE_H = callbacks.h 
 
33
REMOTE_GLADE = $(REMOTE_GLADE_C) $(REMOTE_GLADE_H)
 
34
 
 
35
LSRC = \
 
36
        downloads.c \
 
37
        downloads_cb.c \
 
38
        fileinfo.c \
 
39
        gnet_stats.c \
 
40
        hcache.c \
 
41
        monitor.c \
 
42
        monitor_cb.c \
 
43
        nodes.c \
 
44
        nodes_cb.c \
 
45
        pbarcellrenderer.c \
 
46
        search.c \
 
47
        search_cb.c \
 
48
        search_stats.c \
 
49
        upload_stats.c \
 
50
        uploads.c
 
51
 
 
52
LOBJ = \
 
53
|expand f!$(LSRC) $(REMOTE_GLADE_C)!
 
54
        !f:\.c=.o \
 
55
-expand \\
 
56
 
 
57
GLADE_C = \
 
58
        interface-glade.c \
 
59
        support-glade.c
 
60
 
 
61
GLADE_H = \
 
62
|expand f!$(GLADE_C)!
 
63
        !f:\.c=.h \
 
64
-expand \\
 
65
 
 
66
GLADE_O = \
 
67
|expand f!$(GLADE_C) $(REMOTE_GLADE_C)!
 
68
        !f:\.c=.o \
 
69
-expand \\
 
70
 
 
71
GLADE_GEN = $(GLADE_C) $(GLADE_H)
 
72
 
 
73
SRC = $(LSRC) $(GLADE_C) $(REMOTE_GLADE_C)
 
74
OBJ = $(LOBJ) $(GLADE_O)
 
75
 
 
76
/* Additional flags for GTK compilation, added in the substituted section */
 
77
++GTK_CFLAGS $gtkcflags
 
78
++GTK_LDFLAGS $gtkldflags
 
79
 
 
80
/* Add the glade command */
 
81
++GLADE $glade
 
82
 
 
83
/* Add the libxml2 flags */
 
84
++XML2_CFLAGS $xmlcflags
 
85
++XML2_LDFLAGS $xmlldflags
 
86
 
 
87
TOP_SRC = ../../..
 
88
TOP_GUI = ../..
 
89
 
 
90
;# Those extra flags are expected to be user-defined
 
91
CFLAGS = -I$(TOP) -I$(TOP_SRC) -I$(TOP_GUI) \
 
92
        $(GTK_CFLAGS) $(XML2_CFLAGS) -DGUI_SOURCES -DCURDIR=$(CURRENT)
 
93
DPFLAGS = $(CFLAGS)
 
94
 
 
95
GLADEFILE = gtk-gnutella.glade
 
96
 
 
97
;# We allow the target to fail since we're distribute the generated files
 
98
;# with the sources, so even if they don't have glade, it will work.
 
99
 
 
100
;# Unfortunately there are problems with generating the sources from
 
101
;# the glade file. If the user does not have the right setup then the
 
102
;# compilation will fail, and most users won't be able to correct this
 
103
;# by using the distributed sources instead. Thus: commented out until
 
104
;# better times.
 
105
;#$(GLADE_GEN): $(GLADEFILE) $(REMOTE_GLADE)
 
106
;#      -$(GLADE) --write-source $(GLADEFILE)
 
107
;#      touch $(GLADE_GEN)
 
108
 
 
109
GTK_SHARED = ../gtk-shared
 
110
 
 
111
/*
 
112
 * Files in the GTK_SHARED directory are copied locally, so that they can
 
113
 * be compiled with the relevant -DUSE_GTK1 or -DUSE_GTK2 flag and be
 
114
 * present when "glade" runs.
 
115
 */
 
116
 
 
117
|expand f!$(REMOTE_GLADE)!
 
118
!f: $(GTK_SHARED)/!f
 
119
        $(RM) !f
 
120
        $(CP) $(GTK_SHARED)/!f .
 
121
 
 
122
-expand
 
123
 
 
124
/*
 
125
 * Since the copied files are compiled, they must be part of the dependency
 
126
 * for the "depend" target.  It's a multiple target, hence the "::".
 
127
 */
 
128
 
 
129
depend:: $(REMOTE_GLADE)
 
130
 
 
131
local_realclean::
 
132
        $(RM) $(REMOTE_GLADE)
 
133
 
 
134
/*
 
135
 * Only generate the library if configured to build for GTK2
 
136
 */
 
137
 
 
138
|case d_usegtk2 in define
 
139
NormalLibraryTarget(gtk2, $(SRC), $(OBJ))
 
140
-case
 
141
 
 
142
DependTarget()