Skip to content

Commit

Permalink
Make GIT_VERSION and CC externally configurable. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
rustyx committed Feb 2, 2023
1 parent 8186ca3 commit d481028
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags)
GIT_VERSION ?= $(shell git describe --abbrev=4 --dirty --always --tags)
CC ?= gcc

EthUDP:EthUDP.c
gcc -g -Wall -DVERSION=\"$(GIT_VERSION)\" -o EthUDP EthUDP.c -lpthread -lssl -llz4 -lcrypto -lpcap -D_GNU_SOURCE
$(CC) -g -Wall -DVERSION=\"$(GIT_VERSION)\" -o EthUDP EthUDP.c -lpthread -lssl -llz4 -lcrypto -lpcap -D_GNU_SOURCE

run:
gcc -Wall -DVERSION=\"$(GIT_VERSION)-O3\" -Wunused-result -fno-strict-aliasing -O2 -o EthUDP EthUDP.c -lpthread -lssl -llz4 -lcrypto -lpcap -D_GNU_SOURCE
$(CC) -Wall -DVERSION=\"$(GIT_VERSION)-O3\" -Wunused-result -fno-strict-aliasing -O2 -o EthUDP EthUDP.c -lpthread -lssl -llz4 -lcrypto -lpcap -D_GNU_SOURCE

indent: EthUDP.c
indent EthUDP.c -nbad -bap -nbc -bbo -hnl -br -brs -c33 -cd33 -ncdb -ce -ci4 \
Expand Down

0 comments on commit d481028

Please sign in to comment.