Skip to content

Commit

Permalink
Merge pull request #34 from wllm-rbnt/build-sys
Browse files Browse the repository at this point in the history
Build system updates
  • Loading branch information
adulau authored Sep 22, 2020
2 parents c356337 + 2da2a5a commit df9d6f2
Show file tree
Hide file tree
Showing 9 changed files with 123 additions and 215 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Clang CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt install clang autoconf libpcap-dev libssl-dev
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure CC=/usr/bin/clang
- name: make
run: make
4 changes: 2 additions & 2 deletions .github/workflows/ccpp.yml → .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: C/C++ CI
name: GCC CI

on:
push:
Expand All @@ -19,6 +19,6 @@ jobs:
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure
run: ./configure CC=/usr/bin/gcc
- name: make
run: make
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ common/lib/Makefile.in
compile
config.h
config.h.in
config.guess
config.sub
configure
depcomp
install-sh
Expand Down
13 changes: 8 additions & 5 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,28 @@ ssldump_SOURCES = \
base/pcap-snoop.c\
base/network.c\
base/proto_mod.c\
base/common.c\
ssl/ssl_analyze.c\
null/null_analyze.c\
common/lib/r_data.c\
common/lib/r_assoc.c\
common/lib/r_errors.c\
common/lib/debug.c\
base/tcppack.c\
base/tcpconn.c\
ssl/ssldecode.c\
ssl/sslprint.c\
ssl/ssl.enums.c\
ssl/sslxprint.c\
ssl/ciphersuites.c
ssl/ciphersuites.c\
ssl/ssl_rec.c

ssldump_CPPFLAGS = \
-I$(top_srcdir)\
-I$(top_srcdir)/common/include\
-I$(top_srcdir)/common/lib\
-I$(top_srcdir)/null\
-I$(top_srcdir)/ssl\
-I$(top_srcdir)/base\
-D_BSD_SOURCE=1\
-D_DEFAULT_SOURCE=1\
-DLINUX

-DLINUX\
-DOPENSSL
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,25 @@ make
(optional) make install
```

Optional configuration features (aka ./configure options):
```
--disable-optimization disable compiler optimizations (change from -O2 to -O0)
--enable-debug enable debug info (add "-g -DDEBUG" to CFLAGS)
--enable-asan enable AddressSanitizer and other checks
add "-fsanitize=address,undefined,leak -Wformat -Werror=format-security
-Werror=array-bounds" to CFLAGS
use libasan with GCC and embedded ASAN with Clang
```

Configuration examples:
```
- Use GCC with libasan, debug info and custom CFLAGS:
./configure CC=/usr/bin/gcc --enable-asan --enable-debug CFLAGS="-Wall"
- Use Clang with ASAN and no optimizations (-O0)
./configure CC=/usr/bin/clang --enable-asan --disable-optimization
```

## Contributing

The contributing policy is simple. If you have a patch to propose, make a pull-request
Expand Down
66 changes: 0 additions & 66 deletions base/common.c

This file was deleted.

68 changes: 0 additions & 68 deletions base/debug.c

This file was deleted.

58 changes: 0 additions & 58 deletions base/debug.h

This file was deleted.

Loading

0 comments on commit df9d6f2

Please sign in to comment.