Initial
This commit is contained in:
commit
77de1f5ac0
4 changed files with 227 additions and 0 deletions
22
Makefile
Normal file
22
Makefile
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
GITREV ?= $(shell git describe --dirty --always)
|
||||
BLDDATE ?= $(shell date -I)
|
||||
CR_YEAR ?= $(shell date +%Y)
|
||||
|
||||
CFLAGS ?= -Wall -Wextra -Wpedantic -O2 -std=gnu99
|
||||
CFLAGS += -DGITREV='"$(GITREV)"'
|
||||
CFLAGS += -DBLDDATE='"$(BLDDATE)"'
|
||||
CFLAGS += -DCR_YEAR='"$(CR_YEAR)"'
|
||||
|
||||
# Soon...
|
||||
# CFLAGS += $(shell pkg-config --cflags libudev)
|
||||
# LIBS += $(shell pkg-config --libs libudev)
|
||||
|
||||
writeimg: writeimg.c
|
||||
$(CC) $(CFLAGS) $(LIBS) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f *.o writeimg
|
||||
|
||||
install: writeimg
|
||||
install -c -s writeimg /usr/local/bin/writeimg
|
||||
install -m 0755 $(PROG) $(DESTDIR)$(BINDIR)/$(PROG)
|
||||
Loading…
Add table
Add a link
Reference in a new issue