Merge pull request #1 from ndechesne/gnu

Makefile: implement GNU Coding Standard for Makefiles
This commit is contained in:
Bjorn Andersson 2016-06-06 08:40:23 -07:00
commit 1c036374ea

View File

@ -2,6 +2,7 @@ OUT := qmic
CFLAGS := -Wall -g -O2 CFLAGS := -Wall -g -O2
LDFLAGS := LDFLAGS :=
prefix := /usr/local
SRCS := qmic.c qmi_message.c qmi_struct.c SRCS := qmic.c qmi_message.c qmi_struct.c
OBJS := $(SRCS:.c=.o) OBJS := $(SRCS:.c=.o)
@ -10,7 +11,7 @@ $(OUT): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^ $(CC) $(LDFLAGS) -o $@ $^
install: $(OUT) install: $(OUT)
install -D -m 755 $< $(PREFIX)/bin/$< install -D -m 755 $< $(DESTDIR)$(prefix)/bin/$<
clean: clean:
rm -f $(OUT) $(OBJS) rm -f $(OUT) $(OBJS)