Upload Tizen:Main source
[external/mkdevnodes.git] / Makefile
1
2 VERSION = 0.2
3
4 CC := gcc
5
6 CFLAGS += -W -Wall -g -Os \
7          `pkg-config --cflags glib-2.0`  `pkg-config --cflags libpng` \
8          -D VERSION=\"$(VERSION)\" -fstack-protector -D_FORTIFY_SOURCE=2 \
9          -Wformat -fno-common -Wimplicit-function-declaration  -Wimplicit-int
10
11 PROG = mkdevnodes
12
13 OBJS := $(PROG).o
14
15 all: $(PROG)
16
17
18 %.o: %.c Makefile
19         @echo "  CC  $<"
20         @$(CC) $(CFLAGS) -c -o $@ $<
21
22 $(PROG): $(PROG).o
23         @echo "  LD  $@"
24         @$(CC) $^ -o $@
25
26 clean:
27         rm -f *~ *.o $(PROG)
28
29 install:
30         mkdir -p  $(DESTDIR)/sbin
31         install -D -m0755 $(PROG) $(DESTDIR)/sbin/$(PROG)
32
33 dist: clean
34         git tag v$(VERSION)
35         git archive --format=tar -v --prefix="$(PROG)-$(VERSION)/" \
36                 v$(VERSION) | gzip > $(PROG)-$(VERSION).tar.gz