File: Makefile.in

package info (click to toggle)
rasterview 1.7.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,120 kB
  • sloc: cpp: 5,677; ansic: 2,211; makefile: 93; python: 13
file content (143 lines) | stat: -rw-r--r-- 3,292 bytes parent folder | download
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
#
# Makefile for rasterview, a CUPS/PWG Raster viewing program.
#
# Copyright 2002-2018 by Michael R Sweet
#
# Licensed under Apache License v2.0.  See the file "LICENSE" for more
# information.
#


# Installation directories
BUILDROOT	=	$(DSTROOT)$(RPM_BUILD_ROOT)$(DESTDIR)
prefix		=	@prefix@
exec_prefix	=	@exec_prefix@
bindir		=	@bindir@
datadir		=	@datadir@
datarootdir	=	@datarootdir@
desktopdir	=	@desktopdir@


# Compiler definitions...
CC		=	@CC@
CFLAGS		=	@CPPFLAGS@ @CFLAGS@ @DEFS@
CP		=	@CP@
CXX		=	@CXX@
CXXFLAGS	=	@CPPFLAGS@ @CXXFLAGS@ @DEFS@
FLTKCONFIG	=	@FLTKCONFIG@
LDFLAGS		=	@LDFLAGS@
LIBS		=	@LIBS@
MKDIR		=	@MKDIR@ -p
RM		=	@RM@ -f
SHELL		=	/bin/sh


# Rules for compiling...
.SUFFIXES:	.c .cxx .o
.c.o:
	$(CC) $(CFLAGS) -c $<
.cxx.o:
	$(CXX) $(CXXFLAGS) -c $<


# Objects...
RVOBJS		=	\
			RasterDisplay.o \
			RasterView.o \
			error.o \
			raster.o \
			main.o
OBJS		=	\
			$(RVOBJS) \
			testcie.o


# Standard install targets...
all:	rasterview testcie


clean:
	$(RM) rasterview testcie
	$(RM) $(OBJS)
	$(RM) *.bck
	$(RM) *~


depend:
	makedepend -Y -f .depend *.c *.cxx


distclean:	clean
	$(RM) -r autom4te*
	$(RM) config.*
	$(RM) Makefile
	$(RM) RasterView.app/Contents/MacOS/rasterview


install: all @INSTALLDESKTOP@
	$(MKDIR) $(BUILDROOT)$(bindir)
	cp rasterview $(BUILDROOT)$(bindir)


install-desktop:
	$(MKDIR) $(BUILDROOT)$(desktopdir)/Development
	cp rasterview.desktop $(BUILDROOT)$(desktopdir)/Development
	$(MKDIR) $(BUILDROOT)$(datadir)/mimelnk/application
	cp vnd.cups-raster.desktop $(BUILDROOT)$(datadir)/mimelnk/application
	$(MKDIR) $(BUILDROOT)$(datadir)/mimelnk/image
	cp pwg-raster.desktop $(BUILDROOT)$(datadir)/mimelnk/image
	cp urf.desktop $(BUILDROOT)$(datadir)/mimelnk/image
	$(MKDIR) $(BUILDROOT)$(datadir)/icons/hicolor/32x32/apps
	cp rasterview-32.png $(BUILDROOT)$(datadir)/icons/hicolor/32x32/apps/rasterview.png
	$(MKDIR) $(BUILDROOT)$(datadir)/icons/hicolor/128x128/apps
	cp rasterview-128.png $(BUILDROOT)$(datadir)/icons/hicolor/128x128/apps/rasterview.png


uninstall: @UNINSTALLDESKTOP@
	$(RM) $(BUILDROOT)$(bindir)/rasterview


uninstall-desktop:
	$(RM) $(desktopdir)/Graphics/rasterview.desktop
	$(RM) $(datadir)/mimelnk/application/vnd.cups-raster.desktop
	$(RM) $(datadir)/mimelnk/image/pwg-raster.desktop
	$(RM) $(datadir)/mimelnk/image/urf.desktop
	$(RM) $(datadir)/icons/hicolor/32x32/apps/rasterview.png
	$(RM) $(datadir)/icons/hicolor/128x128/apps/rasterview.png


# Make a disk image with the compiled program on macOS...
VERSION		=	@VERSION@
IDENTITY        =       "Developer ID"

dmg:	all
	rm -f rasterview-$(VERSION).dmg
	test -d RasterView.app/Contents/MacOS || mkdir RasterView.app/Contents/MacOS
	$(CP) rasterview RasterView.app/Contents/MacOS/rasterview
	codesign -s $(IDENTITY) RasterView.app
	dmgbuild -s dmgbuild.py "RasterView $(VERSION)" ~/Desktop/rasterview-$(VERSION)-macos.dmg


# Make an RPM for Linux...
rpm:	all
	epm -v -f rpm -nsm --output-dir dist rasterview
	mv dist/*.rpm .
	rm -rf dist


# Build the rasterview program...
rasterview:	$(RVOBJS) Makefile
	$(CXX) $(LDFLAGS) -o $@ $(RVOBJS) $(LIBS)

$(RVOBJS):	RasterView.h RasterDisplay.h


# Build the CIE test program...
testcie:	testcie.o Makefile
	$(CC) $(LDFLAGS) -o $@ testcie.o -lm


# Dependencies...
$(OBJS):	Makefile

include .depend