File: Makefile

package info (click to toggle)
xmlindent 0.2.18-0.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 176 kB
  • sloc: ansic: 625; yacc: 63; makefile: 29; xml: 22
file content (35 lines) | stat: -rw-r--r-- 791 bytes parent folder | download
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
all: xmlindent

PREFIX=/usr
DESTDIR=
BIN_INSTALL_DIR=$(PREFIX)/bin
MAN_INSTALL_DIR=$(PREFIX)/share/man/man1
CFLAGS=-Wall -g
LDFLAGS=-Wl,-z,defs -Wl,-as-needed -Wl,--no-undefined

xmlindent: buffer.o error.o indent.o main.o
	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@

.c.o:
	$(CC) $(CFLAGS) $^ -c -o $@

indent.c: lex.yy.c
	touch indent.c

lex.yy.c: xmlindent.yy
	flex xmlindent.yy

install: xmlindent
	mkdir -p $(DESTDIR)$(BIN_INSTALL_DIR)
	mkdir -p $(DESTDIR)$(MAN_INSTALL_DIR)
	install -m555 xmlindent $(DESTDIR)$(BIN_INSTALL_DIR)/xmlindent
	install -m444 xmlindent.1 $(DESTDIR)$(MAN_INSTALL_DIR)/xmlindent.1

uninstall:
	rm -f $(DESTDIR)$(BIN_INSTALL_DIR)/xmlindent
	rm -f $(DESTDIR)$(MAN_INSTALL_DIR)/xmlindent.1

clean:
	rm -f xmlindent *.o core lex.yy.c

.PHONY: all clean install uninstall