File: Makefile

package info (click to toggle)
limo 0.2.1-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 132 kB
  • ctags: 143
  • sloc: ansic: 1,406; makefile: 80
file content (83 lines) | stat: -rw-r--r-- 2,215 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
# $Id: Makefile,v 1.8 1999/06/15 23:46:58 fraserm Exp $
# $Log: Makefile,v $
# Revision 1.8  1999/06/15 23:46:58  fraserm
# added version
#
# Revision 1.7  1999/05/30 11:34:24  fraserm
# *** empty log message ***
#
# Revision 1.6  1999/05/30 01:08:48  fraserm
# *** empty log message ***
#
# Revision 1.5  1999/05/26 23:52:42  fraserm
# added custom command stuff
#
# Revision 1.4  1999/05/16 19:46:45  fraserm
# added CHANGELOG
#
# Revision 1.3  1999/04/26 01:14:33  fraserm
# added d and D chunks, up to 0.1.1
#
# Revision 1.2  1999/04/24 15:07:15  fraserm
# added manpage to makefile
#
# Revision 1.1  1999/04/20 23:42:40  fraserm
# Initial revision
#

VERSION=0.2.1

CFLAGS=-O -DVERSION=\"$(VERSION)\"
#CFLAGS=-g

# Edited for Debian GNU/Linux
DESTDIR=
INSTALL=$(DESTDIR)/usr/bin
PROGNAME=limo
OTHERPROGNAME=li

SOURCES=$(PROGNAME).h $(PROGNAME).c flist.c fnode.c display.c custom.c
OBJECTS=$(PROGNAME).o flist.o fnode.o display.o custom.o
OTHERS=Makefile $(PROGNAME).1 LICENCE README CHANGELOG
DISTFILES=$(SOURCES) $(OTHERS)

all: $(PROGNAME)

$(PROGNAME).o: $(PROGNAME).c $(PROGNAME).h

flist.o: flist.c $(PROGNAME).h

fnode.o: fnode.c $(PROGNAME).h

display.o: display.c $(PROGNAME).h

custom.o: custom.c $(PROGNAME).h

$(PROGNAME): $(OBJECTS)
	cc $(CFLAGS) -o $(PROGNAME) $(OBJECTS)

install: all $(PROGNAME).1
	cp $(PROGNAME) $(INSTALL)/$(PROGNAME)
	cp $(PROGNAME) $(INSTALL)/$(OTHERPROGNAME)
	chmod +x $(INSTALL)/$(PROGNAME) $(INSTALL)/$(OTHERPROGNAME)
	strip $(INSTALL)/$(PROGNAME) $(INSTALL)/$(OTHERPROGNAME)
	cp $(PROGNAME).1 $(DESTDIR)/usr/man/man1
	cp $(PROGNAME).1 $(DESTDIR)/usr/man/man1/$(OTHERPROGNAME).1
#	chmod 644 $(DESTDIR)/usr/man/man1/$(PROGNAME).1
#	chmod 644 $(DESTDIR)/usr/man/man1/$(OTHERPROGNAME).1

uninstall:
	rm -f $(INSTALL)/$(PROGNAME) $(INSTALL)/$(OTHERPROGNAME) $(DESTDIR)/usr/man/man8/$(PROGNAME).1

dist: $(PROGNAME)-$(VERSION).tar.gz

$(PROGNAME)-$(VERSION).tar.gz: $(DISTFILES)
	rm -rf $(PROGNAME)-$(VERSION)
	mkdir $(PROGNAME)-$(VERSION)
	cp $(DISTFILES) $(PROGNAME)-$(VERSION)
	tar cvf $(PROGNAME)-$(VERSION).tar $(PROGNAME)-$(VERSION)
	gzip -f9 $(PROGNAME)-$(VERSION).tar
	rm -rf $(PROGNAME)-$(VERSION)

clean:
	rm -f $(OBJECTS) $(PROGNAME) $(PROGNAME)-$(VERSION).tar.gz