aboutsummaryrefslogtreecommitdiffstats
path: root/misc/birthday/files/patch-Makefile
blob: 93013d80f7966eb00e25480bbc18fcab2571a2bc (plain) (blame)
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
--- Makefile    Sat Jan 16 18:08:59 1999
+++ Makefile    Thu Apr  4 19:21:49 2002
@@ -1,24 +1,39 @@
-# overall makefile for birthday, to get around the differing syntax of Borland and GNU makes.
+######################################################################
+# birthday. Reminder of birthdays and other events in the near future.
+# $Id: Makefile.in,v 1.3 2000/01/02 19:17:33 andy Exp $
 
-# version for GNU make
-Makefile.gnu: makemake Makefile.in
-   ./makemake unix < Makefile.in > $@
-
-# version for Borland make
-Makefile.bor: makemake Makefile.in
-   makemake dos < Makefile.in > $@
-
-# I think -o for BCC sets the /object/ file name, rather than the executable ...
-makemake: makemake.c
-   $(CC) -o makemake makemake.c
-
-# targets to make directly, without having to make -f
-birthday install clean: Makefile.gnu
-   make -f Makefile.gnu $@
-
-birthday.exe bdwin.exe: Makefile.bor
-   make -f Makefile.bor $@
-
-# for UNIX only
-../birthday.tgz: *
-   tar --exclude=RCS/* --dereference -czf ../birthday.tgz *
+all: birthday
+
+# NB note the different syntax for if
+
+# UNIX is replaced by name of OS by makemake
+OS=UNIX
+
+# can override this on the commandline if req'd
+DEBUG=
+OSCFLAGS=-Wall -Wstrict-prototypes
+CFLAGS+=-O2 $(DEBUG) -D$(OS) $(OSCFLAGS)
+# engine
+ENGSRC=bdengine.c xmalloc.c
+
+# OS-specific sources 
+OSSRC=
+
+CMDSRC=birthday.c bdcal.c $(ENGSRC) $(OSSRC)
+
+CMDOBJ=$(CMDSRC:.c=.o)
+
+birthday: $(CMDOBJ)
+   $(CC) $(LDFLAGS) $(CMDOBJ) -o $@
+
+# you can override this to use the new FHS locations.
+SHARE=
+#SHARE=/share
+
+install: birthday birthday.man
+   # Installation of dirs bin and man/man1 removed
+   install -s birthday $(PREFIX)/bin/birthday
+   install -m 0644 birthday.man $(PREFIX)/man/man1/birthday.1
+
+clean:
+   rm -f birthday *.o