| 1 |
# Makefile for PDCurses library for X11 |
| 2 |
|
| 3 |
SHELL = @SHELL@ |
| 4 |
|
| 5 |
@SET_MAKE@ |
| 6 |
|
| 7 |
srcdir =@srcdir@ |
| 8 |
prefix =@prefix@ |
| 9 |
exec_prefix =$(DESTDIR)@exec_prefix@ |
| 10 |
libdir =$(exec_prefix)/lib |
| 11 |
bindir =$(exec_prefix)/bin |
| 12 |
includedir =$(exec_prefix)/include |
| 13 |
pdcursesdir =./x11 |
| 14 |
|
| 15 |
INSTALL =$(srcdir)/install-sh |
| 16 |
RANLIB =@RANLIB@ |
| 17 |
SHLPRE = @SHLPRE@ |
| 18 |
SHLPST = @SHLPST@ |
| 19 |
SHLFILE = XCurses |
| 20 |
|
| 21 |
include $(srcdir)/version.mif |
| 22 |
|
| 23 |
PDC_DIR=PDCurses-$(VERDOT) |
| 24 |
|
| 25 |
ZIPFILE = pdcurs$(VER).zip |
| 26 |
TARBALL = $(PDC_DIR).tar.gz |
| 27 |
|
| 28 |
all \ |
| 29 |
clean \ |
| 30 |
distclean \ |
| 31 |
mostlyclean \ |
| 32 |
realclean :: |
| 33 |
cd x11; $(MAKE) $(MFLAGS) $@ |
| 34 |
cd doc; $(MAKE) $(MFLAGS) $@ |
| 35 |
|
| 36 |
install :: |
| 37 |
$(INSTALL) -d -m 755 $(libdir) |
| 38 |
$(INSTALL) -d -m 755 $(bindir) |
| 39 |
$(INSTALL) -d -m 755 $(includedir) |
| 40 |
$(INSTALL) -d -m 755 $(includedir)/xcurses |
| 41 |
$(INSTALL) -c -m 644 $(srcdir)/curses.h $(includedir)/xcurses.h |
| 42 |
$(INSTALL) -c -m 644 $(srcdir)/curses.h $(includedir)/xcurses/curses.h |
| 43 |
sed -e 's/#include <curses.h>/#include <xcurses.h>/' \ |
| 44 |
< $(srcdir)/panel.h > ./xpanel.h |
| 45 |
$(INSTALL) -m 644 ./xpanel.h $(includedir)/xpanel.h |
| 46 |
$(INSTALL) -c -m 644 $(srcdir)/panel.h $(includedir)/xcurses/panel.h |
| 47 |
$(INSTALL) -c -m 644 $(srcdir)/term.h $(includedir)/xcurses/term.h |
| 48 |
$(INSTALL) -c -m 644 $(pdcursesdir)/libXCurses.a $(libdir)/libXCurses.a |
| 49 |
-$(RANLIB) $(libdir)/libXCurses.a |
| 50 |
-$(INSTALL) -c -m 755 $(pdcursesdir)/$(SHLPRE)$(SHLFILE)$(SHLPST) \ |
| 51 |
$(libdir)/$(SHLPRE)$(SHLFILE)$(SHLPST) |
| 52 |
ln -f -s $(libdir)/$(SHLPRE)$(SHLFILE)$(SHLPST) \ |
| 53 |
$(libdir)/$(SHLPRE)Xpanel$(SHLPST) |
| 54 |
ln -f -s $(libdir)/libXCurses.a $(libdir)/libXpanel.a |
| 55 |
-$(RANLIB) $(libdir)/libXpanel.a |
| 56 |
$(INSTALL) -c -m 755 x11/xcurses-config $(bindir)/xcurses-config |
| 57 |
|
| 58 |
clean :: |
| 59 |
rm -f config.log config.cache config.status |
| 60 |
|
| 61 |
distclean :: |
| 62 |
rm -f config.log config.cache config.status |
| 63 |
rm -f config.h Makefile x11/xcurses-config |
| 64 |
|
| 65 |
manual: |
| 66 |
cd doc; $(MAKE) $(MFLAGS) $@ |
| 67 |
|
| 68 |
$(ZIPFILE): |
| 69 |
zip -9y $(ZIPFILE) README HISTORY IMPLEMNT *.spec *.mif *.def \ |
| 70 |
Makefile.in config.h.in configure configure.ac config.guess \ |
| 71 |
config.sub x11/xcurses-config.in install-sh aclocal.m4 curses.h \ |
| 72 |
curspriv.h panel.h term.h pdcurses/README \ |
| 73 |
pdcurses/*.c demos/README demos/*.c demos/*.h dos/README dos/*.c \ |
| 74 |
dos/*.h dos/*.mak dos/*.lrf os2/README os2/*.c os2/*.h os2/*.mak \ |
| 75 |
os2/*.lrf sdl1/README sdl1/*.c sdl1/*.h sdl1/Make* \ |
| 76 |
win32/README win32/*.c win32/*.h win32/*.mak \ |
| 77 |
win32/*.ico win32/*.rc x11/README x11/*.c x11/*.h x11/Makefile.* \ |
| 78 |
x11/*.xbm doc/*.txt doc/manext.c doc/Makefile |
| 79 |
|
| 80 |
zip: $(ZIPFILE) |
| 81 |
|
| 82 |
../$(TARBALL): |
| 83 |
(cd ..; tar cvf - $(PDC_DIR)/README $(PDC_DIR)/HISTORY \ |
| 84 |
$(PDC_DIR)/IMPLEMNT $(PDC_DIR)/*.spec $(PDC_DIR)/*.mif \ |
| 85 |
$(PDC_DIR)/*.def $(PDC_DIR)/Makefile.in $(PDC_DIR)/aclocal.m4 \ |
| 86 |
$(PDC_DIR)/config.h.in $(PDC_DIR)/configure \ |
| 87 |
$(PDC_DIR)/config.guess $(PDC_DIR)/x11/xcurses-config.in \ |
| 88 |
$(PDC_DIR)/config.sub $(PDC_DIR)/configure.ac \ |
| 89 |
$(PDC_DIR)/install-sh $(PDC_DIR)/curses.h $(PDC_DIR)/curspriv.h \ |
| 90 |
$(PDC_DIR)/panel.h $(PDC_DIR)/term.h \ |
| 91 |
$(PDC_DIR)/pdcurses/README $(PDC_DIR)/pdcurses/*.c \ |
| 92 |
$(PDC_DIR)/demos/README $(PDC_DIR)/demos/*.c $(PDC_DIR)/demos/*.h \ |
| 93 |
$(PDC_DIR)/doc/*.txt $(PDC_DIR)/dos/README $(PDC_DIR)/dos/*.c \ |
| 94 |
$(PDC_DIR)/dos/*.h $(PDC_DIR)/dos/*.mak $(PDC_DIR)/dos/*.lrf \ |
| 95 |
$(PDC_DIR)/os2/README $(PDC_DIR)/os2/*.c $(PDC_DIR)/os2/*.h \ |
| 96 |
$(PDC_DIR)/os2/*.mak $(PDC_DIR)/os2/*.lrf \ |
| 97 |
$(PDC_DIR)/sdl1/README $(PDC_DIR)/sdl1/*.c $(PDC_DIR)/sdl1/*.h \ |
| 98 |
$(PDC_DIR)/sdl1/Make* $(PDC_DIR)/win32/README $(PDC_DIR)/win32/*.c \ |
| 99 |
$(PDC_DIR)/win32/*.h $(PDC_DIR)/win32/*.mak \ |
| 100 |
$(PDC_DIR)/win32/*.ico $(PDC_DIR)/win32/*.rc $(PDC_DIR)/x11/README \ |
| 101 |
$(PDC_DIR)/x11/*.c $(PDC_DIR)/x11/*.xbm $(PDC_DIR)/x11/*.h \ |
| 102 |
$(PDC_DIR)/x11/Makefile.* $(PDC_DIR)/doc/manext.c \ |
| 103 |
$(PDC_DIR)/doc/Makefile | gzip -9 > $(TARBALL)) |
| 104 |
|
| 105 |
dist: ../$(TARBALL) |
| 106 |
|
| 107 |
rpm: ../$(TARBALL) |
| 108 |
rpmbuild -ba $(srcdir)/PDCurses.spec |