Skip to content

Commit

Permalink
Merge pull request #4 from vjardin/clang
Browse files Browse the repository at this point in the history
  • Loading branch information
acassen authored Feb 3, 2024
2 parents d66a209 + 7a6746a commit e477e4f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sysconfdir = ${prefix}/etc
init_script = etc/init.d/gtp-guard.init
conf_file = etc/gtp-guard/gtp-guard.conf

CC = gcc
CC ?= gcc
LDFLAGS = -lpthread -lcrypt -ggdb -lm -lz -lresolv -lelf
SUBDIRS = lib src
LIBBPF = libbpf
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ git clone --recursive [email protected]:acassen/gtp-guard.git
cd gtp-guard
make -j $(nproc)
```

gcc is the default compiled. Should you prefer the usage of clang, then use:
```
CC=clang make -j $(nproc)
```
2 changes: 1 addition & 1 deletion lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Copyright (C) 2023 Alexandre Cassen, <[email protected]>
#

CC = gcc
CC ?= gcc
INCLUDES = -I.
CFLAGS = -g -O2 $(INCLUDES) -Wall -Wunused -Wstrict-prototypes
#DEFS = -D_DEBUG_
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Copyright (C) 2023 Alexandre Cassen, <[email protected]>
#

CC = gcc
CC ?= gcc
INCLUDES = -Iinclude -I../lib -I../libbpf/src -I../libbpf/src/uapi
CFLAGS = -g -O2 -ggdb $(INCLUDES) -Wall -Wunused -Wstrict-prototypes -D_GNU_SOURCE
#DEFS = -D_DEBUG_
Expand Down

0 comments on commit e477e4f

Please sign in to comment.