| 1 |
# For GNU Make. |
| 2 |
|
| 3 |
ZFONTSBDF = Zork_r400-10.bdf Zork_r400-11.bdf Zork_r400-13.bdf Zork_r400-16.bdf Zork_r400-20.bdf |
| 4 |
ZFONTSPCF = $(ZFONTSBDF:.bdf=.pcf) |
| 5 |
|
| 6 |
FONTDIR = $(DESTDIR)$(PREFIX)/share/fonts |
| 7 |
X11_FONTDIR = $(FONTDIR)/X11 |
| 8 |
X11_ZORK_FONTDIR = $(X11_FONTDIR)/zork |
| 9 |
|
| 10 |
MKFONTDIR ?= $(shell which mkfontdir) |
| 11 |
XSET ?= $(shell which xset) |
| 12 |
|
| 13 |
help: |
| 14 |
@echo "Font Targets:" |
| 15 |
@echo " pcf: Build PCF fonts from BDF fonts" |
| 16 |
|
| 17 |
pcf: $(ZFONTSPCF) |
| 18 |
|
| 19 |
install_pcf: pcf |
| 20 |
@echo "Installing X11 fonts to $(X11_ZORK_FONTDIR)" |
| 21 |
mkdir -p $(X11_ZORK_FONTDIR) |
| 22 |
install -m 644 -t $(X11_ZORK_FONTDIR) $(ZFONTSPCF) |
| 23 |
$(MKFONTDIR) $(X11_ZORK_FONTDIR) |
| 24 |
$(XSET) +fp $(X11_ZORK_FONTDIR) |
| 25 |
|
| 26 |
uninstall_pcf: |
| 27 |
rm -f $(X11_ZORK_FONTDIR)/*pcf |
| 28 |
rm -f $(X11_ZORK_FONTDIR)/fonts.dir |
| 29 |
# Remove as much as we added as we can. |
| 30 |
find $(FONTDIR) -depth -type d -empty -exec rmdir "{}" \; |
| 31 |
$(XSET) -fp $(X11_ZORK_FONTDIR) |
| 32 |
|
| 33 |
clean: |
| 34 |
rm -f $(TARGET) $(OBJECTS) $(ZFONTSPCF) |
| 35 |
|
| 36 |
.bdf.pcf: |
| 37 |
bdftopcf -t $< -o $@ |
| 38 |
|
| 39 |
.SUFFIXES: .bdf .pcf |
| 40 |
.DELETE_ON_ERROR: |
| 41 |
.PHONY: clean install_pcf uninstall_pcf |