qmic/Makefile
Khem Raj 4ad63502c5 Makefile: Allow compiler/linker flags to be overridden
This helps with cross compilation where toolchains specify
certain flags via environment e.g. CFLAGS/LDFLAGS

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-03-05 21:54:21 -08:00

19 lines
276 B
Makefile

OUT := qmic
CFLAGS ?= -Wall -g -O2
LDFLAGS ?=
prefix ?= /usr/local
SRCS := accessor.c kernel.c parser.c qmic.c
OBJS := $(SRCS:.c=.o)
$(OUT): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^
install: $(OUT)
install -D -m 755 $< $(DESTDIR)$(prefix)/bin/$<
clean:
rm -f $(OUT) $(OBJS)