File: Makefile

package info (click to toggle)
sysnews 0.9-16
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 152 kB
  • ctags: 83
  • sloc: ansic: 943; makefile: 49; sh: 7
file content (44 lines) | stat: -rw-r--r-- 880 bytes parent folder | download | duplicates (7)
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
# Makefile for news	int@link.xs4all.nl
#
# $Revision: 1.6 $
#

VERSION = 0.9

# system news location
NEWSDIR =/var/sysnews
# file in $HOME which indicates the last time news was read
NEWSTIME=.news_time

CC	= gcc
DEFS	= -DNEWSDIR=\"$(NEWSDIR)\" -DNEWSTIME=\"$(NEWSTIME)\" -DVERSION=\"$(VERSION)\"
CFLAGS	= -Wall -O2
LDFLAGS = -s

PREFIX	= /usr/local


OBJECTS = news.o getopt.o

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

all:	 news manpage

news:	 $(OBJECTS)
	 $(CC) $(LDFLAGS) -o $@ $(OBJECTS)

manpage: news.man Makefile
	 sed -e s,/var/sysnews,$(NEWSDIR),g\
	     -e s,.news_time,$(NEWSTIME),g < news.man > news.1

install: all
	 install -o bin -g bin -m 555 news $(PREFIX)/bin
	 install -m 444 news.1 $(PREFIX)/man/man1

release:
	 tar -cvzf news-$(VERSION).tgz \
	  Makefile README getopt.c getopt.h news.c news.h news.man

clean:
	rm -f news $(OBJECTS) news.1