File: Makefile

package info (click to toggle)
tdl 1.0-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 172 kB
  • ctags: 120
  • sloc: ansic: 1,563; makefile: 71; sh: 6
file content (58 lines) | stat: -rw-r--r-- 1,627 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
#  $Header: /cvs/src/tdl/Makefile,v 1.7 2001/10/28 22:59:45 richard Exp $
#  
#  tdl - A console program for managing to-do lists
#  Copyright (C) 2001  Richard P. Curnow
#
#  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 2 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA

CC=gcc
#CFLAGS=-g -Wall
CFLAGS=-O2 -Wall

prefix=/usr

bindir=$(prefix)/bin
mandir=$(prefix)/share/man
man1dir=$(mandir)/man1

OBJ = main.o io.o add.o done.o remove.o move.o list.o \
      report.o purge.o util.o dates.o impexp.o

all : tdl

tdl : $(OBJ)
	$(CC) $(CFLAGS) -o tdl $(OBJ)


%.o : %.c
	$(CC) $(CFLAGS) -c $<

%.s : %.c
	$(CC) $(CFLAGS) -S $<

clean:
	rm -f tdl *.o core

install:
	[ -d $(prefix) ] || mkdir -p $(prefix)
	[ -d $(bindir) ] || mkdir -p $(bindir)
	[ -d $(mandir) ] || mkdir -p $(mandir)
	[ -d $(man1dir) ] || mkdir -p $(man1dir)
	cp tdl $(bindir)/tdl
	chmod 555 $(bindir)/tdl
	(cd $(bindir); ln -sf tdl tdla; ln -sf tdl tdll; ln -sf tdl tdld; ln -sf tdl tdlg)
	cp tdl.1 $(man1dir)/tdl.1
	chmod 444 $(man1dir)/tdl.1