File: Makefile

package info (click to toggle)
cc65 2.19-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 20,268 kB
  • sloc: ansic: 117,151; asm: 66,339; pascal: 4,248; makefile: 1,009; perl: 607
file content (66 lines) | stat: -rw-r--r-- 1,263 bytes parent folder | download | duplicates (2)
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
ifneq ($(shell echo),)
  CMD_EXE = 1
endif

.PHONY: all mostlyclean clean install zip doc html info

.SUFFIXES:

htmldir = $(PREFIX)/share/doc/cc65$(DESTPACKAGE_SUFFIX)/html
infodir = $(PREFIX)/share/info

ifdef CMD_EXE

doc clean install zip:

else # CMD_EXE

SGMLS := $(wildcard *.sgml)

../html/coding.html ../html/index.html: \
TOC_LEVEL = 0

TOC_LEVEL = 2

INSTALL = install

doc: html info

html: $(addprefix ../html/,$(SGMLS:.sgml=.html) doc.css doc.png)

info: $(addprefix ../info/,$(SGMLS:.sgml=.info))

../html ../info:
	@mkdir $@

../html/%.html: %.sgml header.html | ../html
	@cd ../html && linuxdoc -B html -s 0 -T $(TOC_LEVEL) -H ../doc/header.html ../doc/$<

../html/doc.%: doc.% | ../html
	cp $< ../html

../info/%.info: %.sgml | ../info
	@cd ../info && linuxdoc -B info ../doc/$<

clean:
	$(RM) -r ../html ../info

install:
	$(if $(PREFIX),,$(error variable "PREFIX" must be set))
ifeq ($(wildcard ../html),../html)
	$(INSTALL) -d $(DESTDIR)$(htmldir)
	$(INSTALL) -m0644 ../html/*.* $(DESTDIR)$(htmldir)
endif
ifeq ($(wildcard ../info),../info)
	$(INSTALL) -d $(DESTDIR)$(infodir)
	$(INSTALL) -m0644 ../info/*.* $(DESTDIR)$(infodir)
endif

zip:
ifneq "$(wildcard ../html)" ""
	@cd .. && zip cc65 html/*.*
endif

endif # CMD_EXE

all mostlyclean: