File: Makefile

package info (click to toggle)
genromfs 0.5.1-3.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 108 kB
  • ctags: 84
  • sloc: ansic: 636; makefile: 66; sh: 18
file content (55 lines) | stat: -rw-r--r-- 1,079 bytes parent folder | download | duplicates (3)
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

# Makefile for the genromfs program.

all: genromfs

PACKAGE = genromfs
VERSION = 0.5.1
CC = gcc
CFLAGS = -O2 -Wall -DVERSION=\"$(VERSION)\"#-g#
LDFLAGS = -s#-g

DISTDIR = $(PACKAGE)-$(VERSION)

FILES = COPYING NEWS ChangeLog Makefile \
 genromfs.8 genromfs.c genromfs.lsm \
 readme-kernel-patch genrommkdev romfs.txt

prefix = /usr
bindir = $(prefix)/bin
mandir = $(prefix)/man

genromfs: genromfs.o
	$(CC) $(LDFLAGS) genromfs.o -o genromfs

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

clean:
	rm -f genromfs *.o

distclean: clean
	rm -rf $(DISTDIR) $(DISTDIR).tar.gz

dist:
	rm -rf $(DISTDIR).tar.gz $(DISTDIR); \
	mkdir $(DISTDIR); \
	for i in $(FILES); do \
		cp $$i $(DISTDIR)/; \
	done; \
	tar --owner=root --group=root -zcvf $(DISTDIR).tar.gz $(DISTDIR); \
	rm -rf $(DISTDIR)

install: all install-bin install-man

install-bin:
	mkdir -p $(PREFIX)$(bindir)
	install -m 755 genromfs $(PREFIX)$(bindir)/

install-man:
	mkdir -p $(PREFIX)$(mandir)
	if [ -f $(PREFIX)$(bindir)/man8 ]; then \
	rm -f $(PREFIX)$(bindir)/man8; \
	fi
	install -m 644 genromfs.8 $(PREFIX)$(mandir)/man8/