summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: 1dc83f4f47bfe08bbceacd89f4d60c1e467b2e58 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
#
#  Makefile.am - hplip automake input file
#
#  (c) 2004-2007 Copyright Hewlett-Packard Development Company, LP
#

INCLUDES = -Iip -Iio/hpmud -Iscan/sane 

BZRSERVER=http://bzr.linuxprinting.org/devel
#BZRSERVER=http://dsufflnx/bzr

hplipdir = $(datadir)/hplip

docdir = $(hpdocdir)
doc_DATA = COPYING prnt/hpijs/README_LIBJPG
EXTRA_DIST = prnt/hpijs/gdevijs-krgb-1.5-gs8.61.patch prnt/hpijs/README_LIBJPG

dist_noinst_SCRIPTS = 
dist_noinst_DATA =
noinst_PROGRAMS =
lib_LTLIBRARIES = 

include bb_build.inc

if DOC_BUILD
wwwsrc = doc
www0dir = $(docdir)
dist_www0_DATA = $(wwwsrc)/index.html $(wwwsrc)/commandline.html $(wwwsrc)/copying.html $(wwwsrc)/devicemanager.html $(wwwsrc)/faxtrouble.html $(wwwsrc)/gettinghelp.html $(wwwsrc)/hpscan.html $(wwwsrc)/mainttask.html $(wwwsrc)/plugins.html $(wwwsrc)/print.html $(wwwsrc)/printing.html $(wwwsrc)/printoptions.html $(wwwsrc)/printtroubleshooting.html $(wwwsrc)/scanning.html $(wwwsrc)/scantrouble.html $(wwwsrc)/sendfax.html $(wwwsrc)/setup.html $(wwwsrc)/systray.html $(wwwsrc)/troubleshooting.html $(wwwsrc)/uninstalling.html $(wwwsrc)/upgrading.html
www3dir = $(docdir)/styles
dist_www3_DATA = $(wwwsrc)/styles/*
www4dir = $(docdir)/images
dist_www4_DATA = $(wwwsrc)/images/*
endif

if HPLIP_BUILD

dist_hplip_DATA = scan/sane/hpaio.desc prnt/drv/hpijs.drv.in.template
dist_hplip_SCRIPTS = hpssd.py __init__.py install.py hplip-install dat2drv.py

cmddir = $(hplipdir)
dist_cmd_SCRIPTS = align.py info.py print.py toolbox.py clean.py colorcal.py unload.py testpage.py makeuri.py check.py fab.py levels.py \
	sendfax.py setup.py makecopies.py probe.py timedate.py firmware.py scan.py systray.py plugin.py

# hp backend.
hpdir = $(cupsbackenddir)
hp_PROGRAMS = hp
hp_SOURCES = prnt/backend/hp.c
hp_LDADD = libhpmud.la $(DBUS_LIBS)
hp_CFLAGS = $(DBUS_CFLAGS)

# hp-mkuri.
hp_mkuridir = $(bindir)
hp_mkuri_PROGRAMS = hp-mkuri
hp_mkuri_SOURCES = io/hpmud/hp-mkuri.c
hp_mkuri_LDADD = libhpmud.la

# base
basedir = $(hplipdir)/base

dist_base_SCRIPTS = base/maint.py base/codes.py base/g.py base/pml.py base/status.py  \
	base/__init__.py base/mfpdtf.py base/utils.py \
	base/device.py base/logger.py base/slp.py base/exif.py base/strings.py base/magic.py \
	base/imagesize.py base/pexpect.py base/models.py base/mdns.py base/tui.py base/dime.py \
	base/ldif.py base/vcard.py

# installer
installdir = $(hplipdir)/installer
dist_install_SCRIPTS = installer/__init__.py installer/dcheck.py installer/distros.dat installer/core_install.py
dist_noinst_SCRIPTS += installer/text_install.py installer/web_install.py installer/trigger.py  installer/fix_symlink.py
dist_noinst_SCRIPTS += installer/pages/__init__.py installer/pages/install_required.tmpl installer/pages/installation_path.tmpl installer/pages/component.tmpl \
	installer/pages/mode.tmpl installer/pages/confirm_distro.tmpl installer/pages/notes.tmpl installer/pages/error.tmpl installer/pages/options.tmpl \
	installer/pages/error_package_manager.tmpl installer/pages/password.tmpl installer/pages/error_required_missing.tmpl installer/pages/progress.tmpl \
	installer/pages/error_unsupported_distro.tmpl installer/pages/ready_to_build.tmpl installer/pages/finished.tmpl installer/pages/select_distro.tmpl \
	installer/pages/hplip_remove.tmpl installer/pages/hpoj_remove.tmpl installer/pages/unsupported.tmpl installer/pages/turn_off_options.tmpl \
	installer/pages/index.tmpl installer/pages/welcome.tmpl installer/pages/install_optional.tmpl installer/pages/quit.tmpl \
	installer/pages/install_required.tmpl installer/pages/replug.tmpl installer/pages/restart.tmpl installer/pages/network_unavailable.tmpl \
	installer/pages/warning.tmpl
dist_noinst_SCRIPTS += installer/scripts/hplip.js installer/scripts/encode.js installer/scripts/misc_code.js
dist_noinst_DATA += installer/images/button.png installer/images/favicon.ico installer/images/topbar.png installer/images/view.png \
	installer/images/back.png installer/images/circular.gif installer/images/hplogo.png installer/images/tux.png \
	installer/images/button1.png installer/images/button1d.png installer/images/replug1.png installer/images/replug2.png \
	installer/images/replug3.png installer/images/button2.png
dist_noinst_DATA += installer/localization/gui_strings_de_DE.ts installer/localization/gui_strings_en_US.ts installer/localization/gui_strings_es_MX.ts \
	installer/localization/gui_strings_fr_FR.ts installer/localization/gui_strings_it_IT.ts installer/localization/gui_strings_pt_BR.ts \
	installer/localization/gui_strings_ru_RU.ts installer/localization/gui_strings_zh_CN.ts

dist_noinst_SCRIPTS += installer/styles/hplip.css installer/styles/misc.css

# makecopies
copierdir = $(hplipdir)/copier
dist_copier_SCRIPTS = copier/copier.py copier/__init__.py

# fax
if FAX_BUILD
faxdir = $(hplipdir)/fax
dist_fax_SCRIPTS = fax/fax.py fax/__init__.py fax/coverpages.py fax/pmlfax.py fax/soapfax.py fax/faxdevice.py
hpfaxdir = $(cupsbackenddir)
dist_hpfax_SCRIPTS = fax/backend/hpfax.py
faxppddir = $(hpppddir)
dist_faxppd_DATA = fax/ppd/HP-Fax-hplip.ppd fax/ppd/HP-Fax2-hplip.ppd
endif

# ptest
noinst_PROGRAMS += ptest
ptest_SOURCES = pcard/ptest.c pcard/ptest.h pcard/fat.c pcard/fat.h 
ptest_LDADD = libhpmud.la

# data
modelsdir = $(hplipdir)/data/models
images_16x16dir = $(hplipdir)/data/images/16x16
images_32x32dir = $(hplipdir)/data/images/32x32
images_48x48dir = $(hplipdir)/data/images/48x48
images_128x128dir = $(hplipdir)/data/images/128x128
images_devicesdir = $(hplipdir)/data/images/devices
images_otherdir = $(hplipdir)/data/images/other
pcldir = $(hplipdir)/data/pcl
ldldir = $(hplipdir)/data/ldl
postscriptdir = $(hplipdir)/data/ps
localzdir = $(hplipdir)/data/localization
dist_postscript_DATA = data/ps/testpage.ps.gz data/ps/clean_page.pdf.gz
dist_models_DATA = data/models/models.dat

if GUI_BUILD
dist_images_16x16_DATA = data/images/16x16/*
dist_images_32x32_DATA = data/images/32x32/*
dist_images_48x48_DATA = data/images/48x48/*
dist_images_128x128_DATA = data/images/128x128/*
dist_images_devices_DATA = data/images/devices/*
dist_images_other_DATA = data/images/other/*
endif

dist_pcl_DATA = data/pcl/align1_8xx.pcl.gz data/pcl/align1_9xx.pcl.gz data/pcl/align2_8xx.pcl.gz data/pcl/align3_8xx.pcl.gz data/pcl/align4_8xx.pcl.gz \
	data/pcl/align5_8xx.pcl.gz data/pcl/align2_9xx.pcl.gz data/pcl/align3_9xx.pcl.gz data/pcl/align4_450.pcl.gz data/pcl/align6_450.pcl.gz \
	data/pcl/colorcal1_450.pcl.gz data/pcl/colorcal2_450.pcl.gz data/pcl/crbcal.pcl.gz data/pcl/crcaldone.pcl.gz data/pcl/crcbcal.pcl.gz data/pcl/crccal.pcl.gz \
	data/pcl/crcpcal.pcl.gz data/pcl/crpcal.pcl.gz 
dist_ldl_DATA = data/ldl/cb2pcal.ldl.gz data/ldl/cb2pcal_done.ldl.gz data/ldl/cbbcal.ldl.gz data/ldl/cbccal.ldl.gz data/ldl/cbccal_done.ldl.gz data/ldl/cbcpcal.ldl.gz \
	data/ldl/cbpcal.ldl.gz
dist_localz_DATA = data/localization/hplip_de.qm data/localization/hplip_es.qm data/localization/hplip_fr.qm data/localization/hplip_it.qm \
	data/localization/hplip_pt.qm data/localization/hplip_ru.qm data/localization/hplip_zh.qm
dist_noinst_DATA += data/localization/hplip_de.ts data/localization/hplip_es.ts data/localization/hplip_fr.ts data/localization/hplip_it.ts \
	data/localization/hplip_pt.ts data/localization/hplip_ru.ts data/localization/hplip_zh.ts

# unreleased data
include unreleased.inc

# pcard 
pcarddir = $(hplipdir)/pcard
dist_pcard_SCRIPTS = pcard/__init__.py pcard/photocard.py

# pcardext
pcardextdir = $(pyexecdir)
pcardext_LTLIBRARIES = pcardext.la
pcardext_la_LDFLAGS = -module -avoid-version
pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c
pcardext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)

# prnt
prntdir = $(hplipdir)/prnt
dist_prnt_SCRIPTS = prnt/cups.py prnt/__init__.py prnt/ldl.py prnt/pcl.py prnt/colorcal.py

# cupsext
cupsextdir = $(pyexecdir)
cupsext_LTLIBRARIES = cupsext.la
cupsext_la_LDFLAGS = -module -avoid-version
cupsext_la_SOURCES =  prnt/cupsext/cupsext.c 
cupsext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
cupsext_la_LIBADD = -lcups

# ip library
lib_LTLIBRARIES += libhpip.la
libhpip_la_LDFLAGS = -lm -version-info 0:1:0
libhpip_la_SOURCES = ip/xconvolve.c ip/xfax.c ip/xgrayout.c ip/xjpg_dct.c ip/xjpg_fix.c ip/xpad.c ip/xrotate.c ip/xskel.c ip/xtiff.c \
	ip/ipmain.c ip/xchgbpp.c ip/xcrop.c ip/xgamma.c ip/xjpg_dec.c ip/xjpg_huf.c ip/xpcx.c ip/xsaturation.c ip/xtable.c ip/xtonemap.c \
	ip/xbi2gray.c ip/xcolrspc.c ip/xfakemono.c ip/xgray2bi.c ip/xinvert.c ip/xjpg_enc.c ip/xmatrix.c ip/xpnm.c ip/xscale.c ip/xthumb.c ip/xyxtract.c \
	ip/hpip.h ip/ipdefs.h ip/xform.h ip/xjpg_dct.h ip/xjpg_huf.h ip/xjpg_mrk.h 

# hpaio sane backend
if SCAN_BUILD
libsane_hpaiodir = $(libdir)/sane
libsane_hpaio_LTLIBRARIES = libsane-hpaio.la
libsane_hpaio_la_SOURCES = scan/sane/hpaio.c scan/sane/mfpdtf.c scan/sane/pml.c scan/sane/scl.c scan/sane/io.c scan/sane/hpaio.h \
	  scan/sane/pml.h scan/sane/saneopts.h scan/sane/io.h scan/sane/mfpdtf.h scan/sane/sane.h scan/sane/scl.h scan/sane/tables.h \
	  scan/sane/common.c scan/sane/common.h scan/sane/soap.h scan/sane/soapht.h scan/sane/sanei_debug.h scan/sane/sanei.h \
	  scan/sane/sanei_init_debug.c scan/sane/marvell.h $(BB_SCAN_SOURCES)
if DARWIN_BUILD
libsane_hpaio_la_LDFLAGS = -module -framework CoreFoundation $(BB_SCAN_VERSION)
else
libsane_hpaio_la_LDFLAGS = $(BB_SCAN_VERSION)
endif
# The following is a interlibrary dependency that must be compiled first.
libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la $(DBUS_LIBS) -lcups
#libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG
libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS) $(BB_SCAN_CFLAGS)

# scan
scandir = $(hplipdir)/scan
dist_scan_SCRIPTS = scan/__init__.py scan/sane.py

# scanext
scanextdir = $(pyexecdir)
scanext_LTLIBRARIES = scanext.la
scanext_la_LDFLAGS = -module -avoid-version -lsane
scanext_la_SOURCES =  scan/scanext/scanext.c 
scanext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
endif

# hpmud library
MUDNAME=hpmud
lib_LTLIBRARIES += libhpmud.la
libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/musb.c io/hpmud/pml.c \
	  io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/musb.h io/hpmud/pml.h io/hpmud/dot4.c \
	  io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h 
if NETWORK_BUILD
libhpmud_la_LDFLAGS = -version-info 0:2:0 -lusb -lpthread -lnetsnmp -lcrypto
else
libhpmud_la_LDFLAGS = -version-info 0:2:0 -lusb -lpthread
endif
libhpmud_la_CFLAGS = -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\"

# hpmudext
hpmudextdir = $(pyexecdir)
hpmudext_LTLIBRARIES = hpmudext.la
hpmudext_la_LDFLAGS = -module -avoid-version
hpmudext_la_SOURCES = io/mudext/hpmudext.c
hpmudext_la_LIBADD = libhpmud.la
hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)

# hpmud.rules
rulesdir = /etc/udev/rules.d
dist_rules_DATA = data/rules/55-hpmud.rules

# ui
if GUI_BUILD
uidir = $(hplipdir)/ui
dist_ui_SCRIPTS = ui/alignform.py \
	ui/colorcalform_base.py ui/colorcalform.py ui/coloradjform_base.py ui/coloradjform.py ui/devmgr4_base.py ui/devmgr4.py \
	ui/__init__.py ui/loadpaperform_base.py ui/loadpaperform.py \
	ui/paperedgealignform_base.py ui/paperedgealignform.py ui/ui_utils.py \
	ui/settingsdialog_base.py ui/settingsdialog.py ui/aligntype6form1.py ui/aligntype6form1_base.py ui/aligntype6form2_base.py \
	ui/aligntype6form2.py ui/nodevicesform_base.py ui/nodevicesform.py ui/unloadform.py \
	ui/imagepropertiesdlg_base.py ui/imagepropertiesdlg.py ui/choosedevicedlg.py ui/chooseprinterdlg.py \
	ui/aboutdlg.py ui/aboutdlg_base.py ui/waitform.py ui/waitform_base.py ui/cleaningform_base.py ui/cleaningform.py \
	ui/cleaningform2_base.py ui/cleaningform2.py ui/colorcalform2_base.py ui/colorcalform2.py ui/colorcal4form.py \
	ui/colorcal4form_base.py ui/colorcal4form_base.ui ui/printerform.py \
	ui/faxaddrbookgroupsform_base.py ui/faxaddrbookgroupeditform_base.py ui/faxaddrbookform_base.py \
	ui/faxaddrbookform.py ui/faxaddrbookeditform_base.py ui/align10form.py ui/align10form_base.py \
	ui/faxsendjobform.py ui/faxsettingsform_base.py ui/faxsettingsform.py \
	ui/coverpageform_base.py ui/coverpageform.py ui/allowabletypesdlg_base.py ui/allowabletypesdlg.py \
	ui/makecopiesform.py ui/setupform_base.py ui/setupform.py ui/setupmanualfind_base.py \
	ui/setupmanualfind.py ui/setupsettings_base.py ui/setupsettings.py ui/scrollview.py \
	ui/scrollprintsettings.py ui/scrollprint.py ui/scrollfax.py \
	ui/scrollunload.py ui/scrollcopy.py ui/pluginform2.py ui/pluginform2_base.py ui/systemtray_qt3.py \
	ui/systemtray_qt4.py ui/ui_utils.py ui/jobstoragemixin.py ui/pluginlicenseform_base.py ui/pluginlicenseform.py

dist_noinst_DATA += ui/colorcalform2_base.ui ui/settingsdialog_base.ui ui/aligntype6form1_base.ui \
	ui/aboutdlg_base.ui ui/imagepropertiesdlg_base.ui ui/paperedgealignform_base.ui ui/aligntype6form2_base.ui \
	ui/nodevicesform_base.ui ui/cleaningform_base.ui ui/colorcalform_base.ui ui/devmgr4_base.ui ui/loadpaperform_base.ui \
	ui/cleaningform2_base.ui ui/waitform_base.ui ui/coloradjform_base.ui ui/faxaddrbookeditform_base.ui \
	ui/faxaddrbookform_base.ui ui/faxaddrbookgroupeditform_base.ui ui/faxaddrbookgroupsform_base.ui \
	ui/align10form_base.ui  ui/pluginform2_base.ui \
	plugins/powersettingsdialog_base.ui ui/faxsettingsform_base.ui ui/coverpageform_base.ui \
	ui/allowabletypesdlg_base.ui ui/setupform_base.ui ui/setupmanualfind_base.ui \
	ui/setupsettings_base.ui ui/pluginlicenseform_base.ui
endif

# ui plugins
if GUI_BUILD
pluginsdir = $(hplipdir)/plugins
dist_plugins_SCRIPTS = plugins/dj450.py plugins/__init__.py plugins/powersettings.py plugins/powersettingsdialog.py \
	plugins/powersettingsdialog_base.py plugins/Deskjet_460.py plugins/Officejet_H470.py plugins/powersettings2.py
endif

# cheetah
dist_noinst_SCRIPTS += Cheetah/Filters.py Cheetah/SettingsManager.py Cheetah/CheetahWrapper.py Cheetah/ImportHooks.py \
	Cheetah/SourceReader.py Cheetah/Compiler.py Cheetah/ImportManager.py Cheetah/Template.py Cheetah/DummyTransaction.py \
	Cheetah/NameMapper.py Cheetah/TemplateCmdLineIface.py Cheetah/ErrorCatchers.py Cheetah/Parser.py Cheetah/Version.py \
	Cheetah/FileUtils.py Cheetah/Servlet.py Cheetah/CacheRegion.py Cheetah/__init__.py
dist_noinst_SCRIPTS += Cheetah/Utils/Indenter.py Cheetah/Utils/Misc.py Cheetah/Utils/VerifyType.py \
	Cheetah/Utils/WebInputMixin.py Cheetah/Utils/__init__.py
dist_noinst_SCRIPTS += Cheetah/Utils/optik/errors.py Cheetah/Utils/optik/option_parser.py Cheetah/Utils/optik/option.py \
	Cheetah/Utils/optik/__init__.py

# cherrypy
dist_noinst_SCRIPTS += cherrypy/_cphttptools.py cherrypy/_cpwsgi.py cherrypy/__init__.py cherrypy/_cpserver.py cherrypy/_cpwsgiserver.py \
	cherrypy/_cpcgifs.py cherrypy/_cpthreadinglocal.py cherrypy/config.py cherrypy/_cpengine.py cherrypy/_cptree.py cherrypy/_cperror.py \
	cherrypy/_cputil.py 
dist_noinst_SCRIPTS += cherrypy/lib/covercp.py cherrypy/lib/form.py cherrypy/lib/__init__.py cherrypy/lib/cptools.py \
	cherrypy/lib/httptools.py cherrypy/lib/autoreload.py cherrypy/lib/defaultformmask.py cherrypy/lib/profiler.py
dist_noinst_SCRIPTS += cherrypy/filters/nsgmlsfilter.py cherrypy/filters/__init__.py \
	cherrypy/filters/responseheadersfilter.py \
	cherrypy/filters/basefilter.py cherrypy/filters/sessionauthenticatefilter.py cherrypy/filters/baseurlfilter.py \
	cherrypy/filters/sessionfilter.py cherrypy/filters/cachefilter.py cherrypy/filters/staticfilter.py \
	cherrypy/filters/decodingfilter.py cherrypy/filters/tidyfilter.py cherrypy/filters/encodingfilter.py \
	cherrypy/filters/virtualhostfilter.py cherrypy/filters/gzipfilter.py cherrypy/filters/wsgiappfilter.py \
	cherrypy/filters/logdebuginfofilter.py cherrypy/filters/xmlrpcfilter.py

# hppgsz
noinst_PROGRAMS += hppgsz
hppgsz_SOURCES = $(apdk_SOURCES) prnt/hpijs/PrinterProperties.cpp prnt/hpijs/PrinterProperties.h
hppgsz_CXXFLAGS = $(hpijs_CXXFLAGS)
hppgsz_CFLAGS = $(hpijs_CXXFLAGS) -Iprnt/hpijs
hppgsz_LDADD = $(hpijs_LDADD)

# hplip.desktop
hplip_desktopdir = $(icondir)
hplip_desktop_DATA = hplip.desktop

# hplip.conf
hplip_confdir = /etc/hp
hplip_conf_DATA = hplip.conf

# hplip-systray.desktop
hplip_systraydir = $(systraydir)
hplip_systray_DATA = hplip-systray.desktop

endif	# if HPLIP_BUILD

# drv
include foomatic_drv.inc
dist_noinst_DATA += $(foomatic_ps_printers) $(foomatic_ppd_printers)

# foomatic-rip-hplip
if RIP_INSTALL
ripdir = $(cupsfilterdir)
dist_rip_SCRIPTS = prnt/hpijs/foomatic-rip-hplip
endif

# hpipjs
hplipjsdir = $(cupsfilterdir)
hplipjs_PROGRAMS = hplipjs
hplipjs_SOURCES = prnt/filters/hplipjs.c

# hpijs
bin_PROGRAMS = hpijs
apdk_SOURCES = prnt/hpijs/models.cpp prnt/hpijs/breaks_open.cpp \
	prnt/hpijs/dj9xxvip.cpp prnt/hpijs/dj9xx.cpp prnt/hpijs/capture.cpp prnt/hpijs/colormatch.cpp prnt/hpijs/colormatcher_open.cpp \
	prnt/hpijs/compression.cpp prnt/hpijs/context.cpp prnt/hpijs/create_so.cpp prnt/hpijs/creator.cpp \
	prnt/hpijs/dj600.cpp prnt/hpijs/dj630.cpp prnt/hpijs/dj660.cpp prnt/hpijs/dj690.cpp prnt/hpijs/dj6xx.cpp prnt/hpijs/dj8xx.cpp prnt/hpijs/dj600_maps.cpp \
	prnt/hpijs/dj660_maps.cpp prnt/hpijs/dj690_maps.cpp prnt/hpijs/dj895_maps.cpp prnt/hpijs/dj895_maps2.cpp prnt/hpijs/dj970_maps.cpp \
	prnt/hpijs/dj970_maps2.cpp prnt/hpijs/dj970_maps3.cpp prnt/hpijs/filterhpa.cpp prnt/hpijs/apollo21xx.cpp prnt/hpijs/apollo2560.cpp prnt/hpijs/apollo2xxx.cpp \
	prnt/hpijs/dj8x5.cpp prnt/hpijs/psp100.cpp prnt/hpijs/phobos_cmaps.cpp prnt/hpijs/dj350.cpp prnt/hpijs/halftoner.cpp prnt/hpijs/halftoner_open.cpp \
	prnt/hpijs/globals.cpp prnt/hpijs/header.cpp prnt/hpijs/htmtxhi.cpp prnt/hpijs/pmselect.cpp \
	prnt/hpijs/job.cpp prnt/hpijs/printer.cpp prnt/hpijs/registry.cpp prnt/hpijs/scaler.cpp \
	prnt/hpijs/scaler_open.cpp prnt/hpijs/script.cpp prnt/hpijs/systemservices.cpp \
	prnt/hpijs/translator.cpp prnt/hpijs/version.cpp prnt/hpijs/versioncode.cpp \
	prnt/hpijs/djgenericvip.cpp prnt/hpijs/dj540.cpp prnt/hpijs/dj850.cpp prnt/hpijs/dj850_maps.cpp prnt/hpijs/dj890.cpp \
	prnt/hpijs/apollo21xx.h prnt/hpijs/apollo2560.h prnt/hpijs/apollo2xxx.h prnt/hpijs/colormatch.h prnt/hpijs/colormatcher_open.h \
	prnt/hpijs/compression.h prnt/hpijs/config.h prnt/hpijs/context.h prnt/hpijs/dj350.h prnt/hpijs/dj400.h prnt/hpijs/dj540.h \
	prnt/hpijs/dj600.h prnt/hpijs/dj630.h prnt/hpijs/dj660.h prnt/hpijs/dj690.h prnt/hpijs/dj6xx.h prnt/hpijs/dj8x5.h prnt/hpijs/dj8xx.h \
	prnt/hpijs/dj850.h prnt/hpijs/dj890.h prnt/hpijs/dj9xx.h prnt/hpijs/dj9xxvip.h \
	prnt/hpijs/ernieplatform.h prnt/hpijs/filterhpa.h prnt/hpijs/global_types.h prnt/hpijs/halftoner.h prnt/hpijs/font.h prnt/hpijs/debug.h \
	prnt/hpijs/halftoner_open.h prnt/hpijs/header.h prnt/hpijs/hpprint_c_api.h \
	prnt/hpijs/hpprintapi.h prnt/hpijs/hptypes.h prnt/hpijs/htfed.h prnt/hpijs/internal.h \
	prnt/hpijs/interp.h prnt/hpijs/interp_data_50.h prnt/hpijs/io_defs.h prnt/hpijs/job.h prnt/hpijs/models.h prnt/hpijs/modes.h prnt/hpijs/pmselect.h \
	prnt/hpijs/printer.h prnt/hpijs/psp100.h prnt/hpijs/psp470.h prnt/hpijs/resources.h prnt/hpijs/scaler_open.h prnt/hpijs/scaler_prop.h prnt/hpijs/script.h \
	prnt/hpijs/systemservices.h prnt/hpijs/unistd_.h prnt/hpijs/djgenericvip.h prnt/hpijs/ljmono.h prnt/hpijs/ljmono.cpp \
	prnt/hpijs/dj3320.cpp prnt/hpijs/dj3320.h prnt/hpijs/dj3320_cmap.cpp prnt/hpijs/dj3600.cpp prnt/hpijs/dj3600.h prnt/hpijs/dj3600_cmap.cpp prnt/hpijs/dj4100.h \
	prnt/hpijs/dj4100_cmap.cpp prnt/hpijs/ldlencap.h prnt/hpijs/ljcolor.cpp prnt/hpijs/ljcolor.h prnt/hpijs/pscript.h \
	prnt/hpijs/printerproxy.cpp prnt/hpijs/printerfactory.cpp prnt/hpijs/printerproxy.h prnt/hpijs/printerfactory.h \
	prnt/hpijs/ljjetready.cpp prnt/hpijs/ljjetready.h prnt/hpijs/jdatadbf.c prnt/hpijs/jccolor.c prnt/hpijs/ljfastraster.cpp prnt/hpijs/ljfastraster.h \
	prnt/hpijs/jinclude.h prnt/hpijs/jpegint.h prnt/hpijs/dj55xx.h prnt/hpijs/hpijsfax.h prnt/hpijs/ojprokx50.h \
	prnt/hpijs/ljzjs.cpp prnt/hpijs/ljzjs.h prnt/hpijs/ljzjsmono.cpp prnt/hpijs/ljm1005.cpp prnt/hpijs/ljm1005.h \
	prnt/hpijs/ljzjsmono.h prnt/hpijs/hpjbig_wrapper.h prnt/hpijs/quickconnect.cpp prnt/hpijs/quickconnect.h
hpijs_SOURCES = $(apdk_SOURCES) prnt/hpijs/hpijs.cpp prnt/hpijs/ijs_server.c prnt/hpijs/ijs.c prnt/hpijs/hpijsfax.cpp prnt/hpijs/services.cpp \
	prnt/hpijs/hpijs.h prnt/hpijs/ijs.h prnt/hpijs/ijs_server.h prnt/hpijs/services.h prnt/hpijs/ijs_client.h prnt/hpijs/hpiom.c prnt/hpijs/hpiom.h 
hpijs_CXXFLAGS = -DAPDK_DJ660 -DAPDK_DJ6xx -DAPDK_DJ6xxPhoto -DAPDK_DJ8xx -DAPDK_DJ9xx -DAPDK_DJ9xxVIP -DAPDK_DJ630 \
	-DAPDK_APOLLO2XXX -DAPDK_APOLLO21XX -DAPDK_APOLLO2560 -DAPDK_DJ600 -DAPDK_DJ350 -DAPDK_DJ8x5 -DAPDK_PSP100 -DAPDK_AUTODUPLEX \
	-DAPDK_HIGH_RES_MODES -DAPDK_LJMONO -DAPDK_DJ540 -DAPDK_DJ850 -DAPDK_DJ890 -DAPDK_DJ3320 -DAPDK_LJCOLOR -DAPDK_DJGENERICVIP \
	-DAPDK_LJJETREADY  -DAPDK_LJFASTRASTER -DAPDK_BUFFER_SEND -DAPDK_LDL_COMPRESS -DAPDK_EXTENDED_MEDIASIZE \
	-DAPDK_MLC_PRINTER -DAPDK_DJ3600 -DAPDK_LJZJS_MONO -DAPDK_LJM1005 -DAPDK_QUICKCONNECT \
                $(APDK_ENDIAN_FLAG) $(APDK_AUTO_INCLUDE_FLAG) -DAPDK_LINUX -DNDEBUG
hpijs_CFLAGS = $(hpijs_CXXFLAGS) -Iprnt/hpijs
if HPLIP_BUILD
hpijs_LDADD = -ljpeg -ldl libhpip.la libhpmud.la
else
hpijs_LDADD = -ljpeg -ldl
endif

install-data-hook: install-foo
if HPLIP_BUILD
#	   If scanner build, add hpaio entry to sane dll.conf.
	if [ "$(scan_build)" = "yes" ]; then \
	   $(mkinstalldirs) $(DESTDIR)/etc/sane.d; \
	   if [ ! -f $(DESTDIR)/etc/sane.d/dll.conf ]; then \
		  touch $(DESTDIR)/etc/sane.d/dll.conf; \
	   fi; \
	   if ! grep ^hpaio $(DESTDIR)/etc/sane.d/dll.conf >/dev/null 2>/dev/null ; then \
		  echo "Adding hpaio entry to /etc/sane.d/dll.conf." ; \
		  echo hpaio >>$(DESTDIR)/etc/sane.d/dll.conf ; \
	   fi \
	fi
#	   Create hp-xxx commands in bindir.
	$(mkinstalldirs) $(DESTDIR)$(bindir)
	for i in $(dist_cmd_SCRIPTS); do \
	   cmd=`basename $$i .py`; \
	   if [ ! \( "$$cmd" = "toolbox" -a "$(gui_build)" = "no" \) ]; then \
		  ln -sf ../share/$(PACKAGE)/$$i $(DESTDIR)$(bindir)/hp-$$cmd; \
	   fi \
	done
#
#	   Install fax support. 
	if [ "$(fax_build)" = "yes" ]; then \
	   mv $(DESTDIR)$(hpfaxdir)/hpfax.py $(DESTDIR)$(hpfaxdir)/hpfax; \
	   gzip -f $(DESTDIR)$(faxppddir)/HP-Fax-hplip.ppd; \
	   gzip -f $(DESTDIR)$(faxppddir)/HP-Fax2-hplip.ppd; \
	fi
endif # if HPLIP_BUILD

install-foo:
	if [ "$(foomatic_ppd_install)" = "yes" ]; then \
	   $(mkinstalldirs) $(DESTDIR)$(hpppddir); \
	   $(INSTALL_DATA) $(foomatic_ppd_printers) $(DESTDIR)$(hpppddir); \
	   $(INSTALL_DATA) $(foomatic_ps_printers) $(DESTDIR)$(hpppddir); \
	   for i in $(foomatic_ppd_printers); do \
		  id=`basename $$i`; \
		  gzip -f $(DESTDIR)$(hpppddir)/$$id; \
	   done; \
	   for i in $(foomatic_ps_printers); do \
		  id=`basename $$i`; \
		  gzip -f $(DESTDIR)$(hpppddir)/$$id; \
	   done; \
	fi
	if [ "$(foomatic_drv_install)" = "yes" ]; then \
	   $(mkinstalldirs) $(DESTDIR)$(drvdir); \
	   $(INSTALL_DATA) $(foomatic_drv) $(DESTDIR)$(drvdir); \
	   $(mkinstalldirs) $(DESTDIR)$(hpppddir); \
	   $(INSTALL_DATA) $(foomatic_ps_printers) $(DESTDIR)$(hpppddir); \
	   for i in $(foomatic_ps_printers); do \
		  id=`basename $$i`; \
		  gzip -f $(DESTDIR)$(hpppddir)/$$id; \
	   done; \
	fi

uninstall-foo: 
	if [ "$(foomatic_ppd_install)" = "yes" ]; then \
	   for i in $(foomatic_ppd_printers); do \
		  id=`basename $$i`; \
		  rm -f $(DESTDIR)$(hpppddir)/$$id.gz; \
	   done; \
	   for i in $(foomatic_ps_printers); do \
		  id=`basename $$i`; \
		  rm -f $(DESTDIR)$(hpppddir)/$$id.gz; \
	   done; \
	fi
	if [ "$(foomatic_drv_install)" = "yes" ]; then \
	   rm -f $(DESTDIR)$(drvdir)/$(foomatic_drv); \
	   for i in $(foomatic_ps_printers); do \
		  id=`basename $$i`; \
		  rm -f $(DESTDIR)$(hpppddir)/$$id.gz; \
	   done; \
	fi

uninstall-hook: uninstall-foo
if HPLIP_BUILD
#	   Remove hp-xxx commands.
	for i in $(dist_cmd_SCRIPTS); do \
		cmd=`basename $$i .py`; \
		rm -f $(DESTDIR)$(bindir)/hp-$$cmd; \
	done
#
#	   Remove fax support.
	rm -f $(DESTDIR)$(hpfaxdir)/hpfax 
	rm -f $(DESTDIR)$(faxppddir)/HP-Fax-hplip.ppd.gz
	rm -f $(DESTDIR)$(faxppddir)/HP-Fax2-hplip.ppd.gz
endif

rpm_unleaded:
	epm -f rpm hpliplite UNLEADED=1 hplip.list
rpm_regular:
	epm -f rpm hplipfull hplip.list
deb_unleaded:
	epm -f deb hpliplite UNLEADED=1 hplip.list
deb_regular:
	epm -f deb hplipfull hplip.list
epm_unleaded:
	epm hpliplite UNLEADED=1 hplip.list
epm_regular:
	epm hplipfull hplip.list