diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d6bfbbf --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ + +VERSION = 0.2 + +CC := gcc + +CFLAGS += -W -Wall -g -Os \ + `pkg-config --cflags glib-2.0` `pkg-config --cflags libpng` \ + -D VERSION=\"$(VERSION)\" -fstack-protector -D_FORTIFY_SOURCE=2 \ + -Wformat -fno-common -Wimplicit-function-declaration -Wimplicit-int + +PROG = mkdevnodes + +OBJS := $(PROG).o + +all: $(PROG) + + +%.o: %.c Makefile + @echo " CC $<" + @$(CC) $(CFLAGS) -c -o $@ $< + +$(PROG): $(PROG).o + @echo " LD $@" + @$(CC) $^ -o $@ + +clean: + rm -f *~ *.o $(PROG) + +install: + mkdir -p $(DESTDIR)/sbin + install -D -m0755 $(PROG) $(DESTDIR)/sbin/$(PROG) + +dist: clean + git tag v$(VERSION) + git archive --format=tar -v --prefix="$(PROG)-$(VERSION)/" \ + v$(VERSION) | gzip > $(PROG)-$(VERSION).tar.gz |