Initial commit
This commit is contained in:
25
Makefile
Normal file
25
Makefile
Normal file
@ -0,0 +1,25 @@
|
||||
CC=gcc
|
||||
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-lconfig
|
||||
|
||||
INST_DIR=/opt/sbin
|
||||
|
||||
REFCNT:=$(shell git rev-list --all --count)
|
||||
VERSION:=$(shell cat VERSION)
|
||||
|
||||
.PHONY: all
|
||||
all: mqttauditing
|
||||
|
||||
mqttauditing: mqttauditing.o logging.o ringbuffer.o version.o
|
||||
$(CC) -o $@ $(LDFLAGS) $^
|
||||
|
||||
version.o: version.c VERSION
|
||||
$(CC) -DD_REFCNT=$(REFCNT) -DD_VERSION=\"$(VERSION)\" -c $<
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-rm -f *.o mqttauditing
|
Reference in New Issue
Block a user