File: Makefile.bsd.in

package info (click to toggle)
cti-ifhp 2.1.8-2
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 932 kB
  • ctags: 845
  • sloc: ansic: 6,036; sh: 1,524; makefile: 318
file content (145 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
144
145
#**************************************************************************
#* LPRng IFHP Filter
#* Copyright 1994-1997 Patrick Powell, San Diego, CA <papowell@sdsu.edu>
#*
#* Based on the CTI printer filters.
#*  See COPYRIGHT for details.
#*
#* $Id: Makefile.bsd.in,v 1.1 1997/02/05 22:35:46 papowell Exp $
#


# where the filters are installed:
INSTDIR=@prefix@/lib/filters
# where the fonts are installed (this path should agree
# with the one in FONTPATH).
FONTDIR=@prefix@/lib/filters/fonts

# shell to use
SHELL=@SHELL@

#
# the compiler optimisation/debugging flags you wish to use.
# what C compiler to use.
#
CC=@CC@
CCOPTFLAGS =  @CFLAGS@
LDFLAGS    =  $(CCOPTFLAGS)
# add additional definitions here
DEFS=@DEFS@

# use FLAGS for additional flags
CFLAGS = $(CCOPTFLAGS) $(DEFS) $(FLAGS)

# libraries you will need (found by config), add more to end
LIBS=@LIBS@

INSTALLCMD=@INSTALL@
SHELL = @SHELL@

SRC=@srcdir@
@SET_MAKE@
RANLIB=@RANLIB@

######### - no changes by configure after here #############


MACHINESFONTS= -DMACHINESFONTS=\"host_fonts\"
# Accounting shell location
ACCNTSH= -DACCNTSH=\"$(INSTDIR)/accounting.sh\"

# Font Path 
FONTPATH= -DFONTPATH=\"$(FONTDIR)\"
# Default font for the case that no entry exists for a 
# machine in previous file.
#DEFLTFONT= -DDEFLTFONT=\"elot-928/c1201c.10\"
# Default font to be downloaded is NONE

# OF FILTER NAME
OFHP= -DOFHP=\"ofhp\"

SRCDIRS=${SRC}/.
INCLUDE=.. ${SRC}/.
.PATH: $(INCLUDE) $(SRCDIRS)
INCS= $(INCLUDE:S/^/-I/g)

#if you want quiet operation, i.e. - only serious messages logged,
# uncomment out the following line
#QUIET=-DQUIET

# use FLAGS for additional flags

FLAGS=  ${ACCNTSH} ${MACHINESFONTS} ${FONTPATH} ${DEFLTFONT} ${OFHP} \
	$(QUIET) $(INCS)

# commands made by this script
COMMANDS= ifhp accounting.sh banner.sh psbanner.sh monitor

.SUFFIXES: .sh .sh_init

.sh_init.sh:
	sed -e 's:_INSTDIR_:$(INSTDIR):g' \
		-e 's:_SHELL_:$(SHELL):g' \
		$> >$@
	chmod +x $@

all: ${COMMANDS}

.PHONY: all clean install lorder

#
# Object - Source  dependencies
#
IFOBJS = ifhp.o
LIB_OBJS = \
	args.o banner.o check_code.o check_job.o cleanup.o copyright.o \
	do_monitor.o doaccnt.o fexit.o file_read.o fonts.o get_info.o \
	get_num.o getcrstr.o log.o monitor.o open_device.o out_line.o \
	page_set.o port_read.o pr_pagecount.o pr_query.o \
	pr_synch.o readpipe.o sendfont.o sendjob.o setpcl_on.o setstatus.o \
	snprintf.o stty.o vars.o write_check.o writecn.o

lib_print.a: $(LIB_OBJS)
	ar ruv $@ $(LIB_OBJS)
	$(RANLIB) $@

ifhp:	$(IFOBJS) lib_print.a
	${CC} ${LDFLAGS} $> ${LIBS} -o $@

$(IFOBJS) $(LIB_OBJS): hp4.h config.h common.h

monitor: monitor.o snprintf.o
	${CC} ${LDFLAGS} $> ${LIBS} -o $@

#
# Installation of commands
#
install: all
	-mkdir -p $(INSTDIR)
	for i in $(COMMANDS) ; do \
		$(INSTALLCMD) -m 755 $$i $(INSTDIR); \
	done ;
	cd $(INSTDIR); rm -f ofhp; ln -s ifhp ofhp

#
# Miscellaneous
#

clean:
	-rm -f $(COMMANDS) *.o *.a core ? pfu tags

lorder: $(LIB_OBJS)
	lorder $(LIB_OBJS) | tsort

ci: 
	if test ! -d RCS ; then mkdir RCS; fi;
	for i in \
		*.[ch] Makefile* \
		accounting.sh_init banner.sh_init ellipse.ps psbanner.sh_init \
		testbanner testif testnostat testnw testof \
		; do \
		if [ -f $$i ]; then ci $(CI) -l -mUpdate -t-Initial $$i; fi; \
	done;

distclean:
	-rm -f Makefile