File: Makefile

package info (click to toggle)
typespeed 0.4.4-8sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 220 kB
  • ctags: 90
  • sloc: ansic: 1,924; makefile: 85; sh: 23
file content (65 lines) | stat: -rw-r--r-- 1,516 bytes parent folder | download | duplicates (4)
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
#
# typespeed makefile
#

CC = gcc 
CFLAGS = -O -D_GNU_SOURCE -Wall
LFLAGS = -lncurses

PROG = typespeed
SRCS = file.c  menu.c  misc.c  network.c
OBJS = file.o  menu.o  misc.o  network.o

local_dir = $(HOME)
install_dir = "/usr/local/bin"
wordfiles = "/usr/local/lib"
man_dir  = "/usr/local/man/man1/"

all: clean $(PROG)


clean:
	rm -f $(PROG) *.o high.*


$(PROG): $(OBJS)
	
	$(CC) $(CFLAGS) $(OBJS) -o $(PROG) $(PROG).c $(LFLAGS)


install: typespeed

	@echo Installing. You need to be root, or have access to install dirs
	@echo ..and we know that everyone can delete the highscores, but
	@echo we did not want to put setuid or setgid to typespeed yet,
	@echo because then we would have to make a user for those..
	@echo If you like to do it in that way, do it yourself. 
	@echo 
	cp typespeed $(install_dir)
	chmod 755 $(install_dir)/typespeed
	if test ! -d $(wordfiles)/typespeed; then mkdir $(wordfiles)/typespeed; fi
	./typespeed --makescores
	cp words.* $(wordfiles)/typespeed
	cp high.* $(wordfiles)/typespeed
	chmod 755 $(wordfiles)/typespeed
	chmod 666 $(wordfiles)/typespeed/high.*
	chmod 644 $(wordfiles)/typespeed/words.*
	echo $(wordfiles)/typespeed/ > /etc/typespeedrc
	cp typespeed.1 $(man_dir)
	chmod 644 $(man_dir)/typespeed.1
	@echo done...

uninstall: distclean

distclean:

	rm -f $(install_dir)/typespeed
	rm -Rf $(wordfiles)/typespeed 
	rm -f /etc/typespeedrc
	rm -f high.*
	rm -f typespeed *.o
	rm -f $(man_dir)/typespeed.1

love: 

	@echo this program does not cum with virtual megababe!