File: Makefile.OS2

package info (click to toggle)
units 2.22-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,888 kB
  • sloc: ansic: 5,772; makefile: 709; yacc: 435; python: 413; sh: 404; perl: 332
file content (71 lines) | stat: -rw-r--r-- 2,313 bytes parent folder | download | duplicates (9)
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
#  Makefile for the OS/2 version of units
#  Peter Weilbacher (os2@Weilbacher.org), 25Jan2003.
#
#  Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 3 of the License, or
#  (at your option) any later version.
# 
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

CC=gcc
CFLAGS=-Zomf
LFLAGS=-Zlinker /PM:VIO -Zlinker /E:2 -Lf:\P\emx\lib -Lf:\P\emx\lib\st -lm -lreadline -ltermcap
O=.o

NAME=units
READLINE=-DREADLINE
OBJECTS=$(NAME)$O getopt$O getopt1$O strfunc$O parse.tab$O # ansi2knr$O
EXE=$(NAME).exe
DOC=$(NAME).doc
MAN=$(NAME).man
SRCFILES=ChangeLog INSTALL Makefile.dos Makefile.in aclocal.m4 \
	ansi2knr.1 ansi2knr.c configure configure.in getopt.c getopt.h \
	getopt1.c install-sh mkinstalldirs strfunc.c texi2man units.c \
	units.texinfo \
	Makefile.OS2
DISTFILES=COPYING README NEWS units.dat \
	ReadMe.OS2 makeobjs.cmd \
	$(EXE) $(DOC) $(NAME).less

.SUFFIXES: .c $O

.c$O:	
	$(CC) $(CFLAGS) $(READLINE) -c $<

all:	$(EXE) $(DOC)

$(EXE): $(OBJECTS)
	$(CC) $(CFLAGS) $(LFLAGS) $(READLINE) $(OBJECTS) -o $@

$(DOC):	$(NAME).texinfo texi2man
	perl .\texi2man $(NAME).texinfo > $(MAN)
	sed s!@DATAFILE@!units.dat! $(NAME).man > $(NAME).1
	groff -man $(NAME).1 > $(NAME).less
#	col -b $(NAME).less > $(DOC)
	sed -e "s/_//g" -e "s/.//g" units.less > units.doc

dist:	all
	@mkdir dist
	@cp -f $(DISTFILES) dist
	@zip -9rSq dist\units-src.zip $(SRCFILES)
	@rm -f $(OBJECTS)

check:	$(EXE)
	@echo Checking $(EXE)
	@echo If output is "* 25.4" the program should be OK
	@$(EXE) -f .\units.dat kiloinch meter | grep "\*"
	@echo End check

clean:	
	rm -f $(OBJECTS) $(EXE) $(MAN) $(NAME).1 $(NAME).less $(DOC)
	rm -rf dist