~ubuntu-branches/ubuntu/breezy/fortunes-es/breezy

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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#
# Makefile for fortune-mod
# modified for use in fortune-es
#

# Where does the fortune program go?
FORTDIR=$(prefix)/usr/games
# Where do the data files (fortunes, or cookies) go?
COOKIEDIR=$(prefix)/usr/share/games/fortunes
# Offensive ones?
OCOOKIEDIR=$(COOKIEDIR)/off
# The ones with html tags?
WCOOKIEDIR=$(COOKIEDIR)/html
# Where do local data files go?
LOCALDIR=$(prefix)/usr/local/share/games/fortunes
# Offensive ones?
LOCALODIR=$(LOCALDIR)/off
# With HTML tags?
LOCALWDIR=$(LOCALDIR)/html
# Where do strfile and unstr go?
BINDIR=$(prefix)/usr/bin
# What is the proper mode for strfile and unstr? 755= everyone, 700= root only
BINMODE=0755
#BINMODE=0700
# Where do the man pages for strfile and unstr go?
BINMANDIR=$(prefix)/usr/share/man/man1
# What is their proper extension?
BINMANEXT=1
# And the same for the fortune man page
FORTMANDIR=$(prefix)/usr/share/man/man6
FORTMANEXT=6
# Do we want to install the offensive files? (0 no, 1 yes)
OFFENSIVE=1
# Do we want to install files with html tags? (0 no, 1 yes)
# (Note: These files are not yet available)
WEB=0

# Only ANSI-compatible C compilers are currently supported
CC=gcc
DEFINES=-DFORTDIR="\"$(COOKIEDIR)\"" -DOFFDIR="\"$(OCOOKIEDIR)\"" -DLOCFORTDIR="\"$(LOCALDIR)\"" -DLOCOFFDIR="\"$(LOCALODIR)\""
CFLAGS=-O2 $(DEFINES) -Wall -fomit-frame-pointer -pipe -fsigned-char
LDFLAGS=-s



# to get a list of the possible targets, try 'make help'

# All targets are available at the top level, which exports the
# variables to sub-makes.  Avoid makes in subdirectories; cd .. and
# make <target> instead.

# ----------------------------------------
# Nothing below this line should have to be changed

SUBDIRS=datfiles util

.PHONY: all randstr rot cookies cookies-z install  \
	clean love help

# By default, compile optimized versions
all: util-bin cookies-z


util-bin:
	cd util && $(MAKE) CC='$(CC)' CFLAGS='$(CFLAGS)'	\
		    LDFLAGS='$(LDFLAGS)' randstr rot

cookies:
	@echo "Try the kitchen, silly!" ; sleep 3
	@echo "Sorry, just joking."
	$(MAKE) cookies-z

cookies-z: util-bin
	cd datfiles && $(MAKE) COOKIEDIR=$(COOKIEDIR) \
		    OCOOKIEDIR=$(OCOOKIEDIR) WCOOKIEDIR=$(WCOOKIEDIR) \
		    OFFENSIVE=$(OFFENSIVE) WEB=$(WEB)

# Install everything
install: install-cookie
install-utf8: install-utf8-cookie


# Install the fortune cookie files
install-cookie: cookies-z
	cd datfiles && $(MAKE) COOKIEDIR=$(COOKIEDIR) \
		    OCOOKIEDIR=$(OCOOKIEDIR) WCOOKIEDIR=$(WCOOKIEDIR) \
		    OFFENSIVE=$(OFFENSIVE) WEB=$(WEB) install

install-utf8-cookie: cookies-z
	cd datfiles && $(MAKE) COOKIEDIR=$(COOKIEDIR) \
		    OCOOKIEDIR=$(OCOOKIEDIR) WCOOKIEDIR=$(WCOOKIEDIR) \
		    OFFENSIVE=$(OFFENSIVE) WEB=$(WEB) install-utf8

clean:
	for i in $(SUBDIRS) ; do (cd $$i && $(MAKE) clean); done

love:
	@echo "Not war?" ; sleep 3
	@echo "Look, I'm not equipped for that, okay?" ; sleep 2
	@echo "Contact your hardware vendor for appropriate mods."

help:
	@echo "Targets:"
	@echo
	@echo "all:	make all the binaries and data files (the default target)"
	@echo "clean:	Remove object files and binaries"
	@echo 
	@echo "help:	This screen"
	@echo
	@echo "love:	What a *good* idea!  Let's!"