|
|
1 | DESTDIR= |
|
|
2 | BINDIR=/usr/bin |
|
|
3 | MANDIR=/usr/share/man |
|
|
4 | QEMUSTARTGROUP=emulator |
|
|
5 | |
1 | PACKAGE=qemu-start |
6 | PACKAGE=qemu-start |
2 | VERSION=1.0 |
7 | VERSION=2.0 |
3 | FILES=AUTHORS COPYING README Makefile qemu-start.c qemu-start.1 |
8 | FILES=AUTHORS COPYING NEWS README Makefile qemu-start.c qemu-start.1 qemu-start.ggo |
4 | BASENAME=$(PACKAGE)-$(VERSION) |
9 | BASENAME=$(PACKAGE)-$(VERSION) |
5 | |
10 | |
6 | CFLAGS=-Wall -W |
11 | CFLAGS=-Wall -W |
7 | |
12 | |
8 | all: qemu-start |
13 | all: qemu-start |
9 | |
14 | |
|
|
15 | qemu-start : qemu-start.o cmdline.o qemu-start.c cmdline.c cmdline.h qemu-start.ggo |
|
|
16 | $(CC) -o qemu-start qemu-start.o cmdline.o |
|
|
17 | |
|
|
18 | cmdline.o : cmdline.c cmdline.h qemu-start.ggo |
|
|
19 | |
|
|
20 | qemu-start.o: qemu-start.c cmdline.h qemu-start.ggo |
|
|
21 | |
|
|
22 | cmdline.c : qemu-start.ggo |
|
|
23 | gengetopt -i qemu-start.ggo -u |
|
|
24 | |
|
|
25 | # Automake FAQ: make cmdline.h depend on cmdline.c to compensate for parallel |
|
|
26 | # make problems (gengetopt produces two result files). |
|
|
27 | cmdline.h : cmdline.c qemu-start.ggo |
|
|
28 | gengetopt -i qemu-start.ggo -u |
|
|
29 | |
10 | install: |
30 | install: |
11 | install -d $(DESTDIR)/usr/bin |
31 | install -d $(DESTDIR)$(BINDIR) |
12 | install -o root -g emulator -m 4710 qemu-start $(DESTDIR)/usr/bin/ |
32 | install -o root -g $(QEMUSTARTGROUP) -m 4710 qemu-start $(DESTDIR)$(BINDIR) |
13 | install -d $(DESTDIR)/usr/share/man/man1 |
33 | install -d $(DESTDIR)$(MANDIR)/man1 |
14 | install -o root -g root -m 755 qemu-start.1 $(DESTDIR)/usr/share/man/man1 |
34 | install -o root -g root -m 755 qemu-start.1 $(DESTDIR)$(MANDIR)/man1 |
15 | |
35 | |
16 | clean: |
36 | clean: |
17 | $(RM) qemu-start |
37 | $(RM) qemu-start |
|
|
38 | $(RM) cmdline.o |
|
|
39 | $(RM) qemu-start.o |
|
|
40 | $(RM) cmdline.c |
|
|
41 | $(RM) cmdline.h |
18 | |
42 | |
19 | package: |
43 | package: |
20 | ln -s . $(BASENAME) |
44 | ln -s . $(BASENAME) |
21 | tar cfvzp $(BASENAME).tar.gz $(addprefix $(BASENAME)/,$(FILES)) |
45 | tar cfvzp $(BASENAME).tar.gz $(addprefix $(BASENAME)/,$(FILES)) |
22 | $(RM) $(BASENAME) |
46 | $(RM) $(BASENAME) |