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
|
######################################################################
# birthday. Reminder of birthdays and other events in the near future.
# $Id: Makefile,v 1.4 2005/09/02 19:33:18 andymort Exp $
OS=UNIX
#OS=DOS
# can override this on the commandline if req'd
DEBUG=
ifeq ($(OS),DOS)
OSCFLAGS=-w
else
OSCFLAGS=-Wall -Wstrict-prototypes
endif
CFLAGS+=-O2 $(DEBUG) -D$(OS) $(OSCFLAGS)
# engine
ENGSRC=bdengine.c xmalloc.c
# OS-specific sources
ifeq ($(OS),DOS)
OSSRC=alloca.c getopt.c
else
OSSRC=
endif
CMDSRC=birthday.c bdcal.c $(ENGSRC) $(OSSRC)
WINSRC=winbd.c $(ENGSRC) $(OSSRC)
ifeq ($(OS),DOS)
CMDOBJ=$(CMDSRC:.c=.obj)
WINOBJ=$(WINSRC:.c=.obj) bdwin.res
else
CMDOBJ=$(CMDSRC:.c=.o)
#WINOBJ=$(WINSRC:.c=.o)
endif
ifeq ($(OS),DOS)
birthday.exe: $(CMDOBJ)
$(CC) $(LDFLAGS) $(CMDOBJ) -e $@
bdwin.res: bdwin.rc
rc -r bdwin
bdwin.exe: $(WINOBJ)
$(CC) $(LDFLAGS) $(WINOBJ) -e $@
rc bdwin
else
birthday: $(CMDOBJ)
$(CC) $(LDFLAGS) $(CMDOBJ) -o $@
# you can override this to use the new FHS locations.
SHARE=
#SHARE=/share
install: birthday birthday.man
install -d $(DESTDIR)/usr/bin $(DESTDIR)/usr$(SHARE)/man/man1
install birthday $(DESTDIR)/usr/bin/birthday
install -m 0644 birthday.man $(DESTDIR)/usr$(SHARE)/man/man1/birthday.1
test: birthday
sh runtest.sh -exec `pwd`/birthday test/*.t
clean:
rm -f birthday *.o
VERSION := $(shell sed -ne '/^birthday/s/.*(\(.*\))/\1/gp' ChangeLog | head -1)
dist:
ln -s . birthday-$(VERSION)
tar cf - `grep / CVS/Entries | cut -f2 -d/ | sed "s;^;birthday-$(VERSION)/;"` | bzip2 -c > birthday-$(VERSION).tar.bz2
rm birthday-$(VERSION)
endif
.PHONY: test
|