Merge pull request #187 from louib/project_layout

Creating subdirs for third-party modules.
This commit is contained in:
PartialVolume
2020-01-11 00:40:17 +00:00
committed by GitHub
12 changed files with 13 additions and 26 deletions

View File

@@ -21,6 +21,4 @@ jobs:
run: make
# Changing the path should no longer be necessary when clang-format6 is installed.
- name: verifying code style
# TODO use check-format when all the code has been formatted.
# run: export PATH=$PATH:/usr/lib/llvm-5.0/bin && make check-format
run: export PATH=$PATH:/usr/lib/llvm-5.0/bin && clang-format -i -style=file src/context.h src/device.h src/device.c src/logging.c src/logging.h src/nwipe.c src/nwipe.h src/options.c src/options.h src/gui.h src/gui.c src/version.h src/version.c src/method.h src/method.c src/pass.c src/pass.h src/prng.c src/prng.h && git diff-index --quiet HEAD
run: export PATH=$PATH:/usr/lib/llvm-5.0/bin && make check-format

View File

@@ -21,6 +21,4 @@ jobs:
run: make
# Changing the path should no longer be necessary when clang-format6 is installed.
- name: verifying code style
# TODO use check-format when all the code has been formatted.
# run: export PATH=$PATH:/usr/lib/llvm-5.0/bin && make check-format
run: export PATH=$PATH:/usr/lib/llvm-5.0/bin && clang-format -i -style=file src/context.h src/device.h src/device.c src/logging.c src/logging.h src/nwipe.c src/nwipe.h src/options.c src/options.h src/gui.h src/gui.c src/version.h src/version.c src/method.h src/method.c src/pass.c src/pass.h src/prng.c src/prng.h && git diff-index --quiet HEAD
run: export PATH=$PATH:/usr/lib/llvm-5.0/bin && make check-format

15
.gitignore vendored
View File

@@ -13,19 +13,10 @@ install-sh
man/Makefile
man/Makefile.in
missing
src/.deps/
src/**/.deps/
src/**/.dirstamp
*.o
src/Makefile
src/Makefile.in
src/nwipe
src/nwipe-device.o
src/nwipe-gui.o
src/nwipe-isaac_rand.o
src/nwipe-logging.o
src/nwipe-method.o
src/nwipe-mt19937ar-cok.o
src/nwipe-nwipe.o
src/nwipe-options.o
src/nwipe-pass.o
src/nwipe-prng.o
src/nwipe-version.o
stamp-h1

View File

@@ -1,9 +1,9 @@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = src man
NWIPESOURCES = src/*.c src/*.h
# The set of files to be formatted.
FORMATSOURCES = src/*.c src/*.h
format:
clang-format -i -style=file $(NWIPESOURCES)
clang-format -i -style=file $(FORMATSOURCES)
check-format:
clang-format -i -style=file $(NWIPESOURCES) && git diff-index --quiet HEAD
clang-format -i -style=file $(FORMATSOURCES) && git diff-index --quiet HEAD

View File

@@ -3,7 +3,7 @@
AC_PREREQ([2.64])
AC_INIT([nwipe], [0.26], [git@brumit.nl])
AM_INIT_AUTOMAKE
AM_INIT_AUTOMAKE(foreign subdir-objects)
AC_OUTPUT(Makefile src/Makefile man/Makefile)
AC_CONFIG_SRCDIR([src/nwipe.c])
AC_CONFIG_HEADERS([config.h])

View File

@@ -6,6 +6,6 @@ AM_LDFLAGS =
# this lists the binaries to produce, the (non-PHONY, binary) targets in
# the previous manual Makefile
bin_PROGRAMS = nwipe
nwipe_SOURCES = context.h isaac_rand.c logging.h options.h prng.h nwipe.c gui.c isaac_rand.h method.h pass.c device.c gui.h isaac_standard.h mt19937ar-cok.c nwipe.h mt19937ar-cok.h pass.h device.h logging.c method.c options.c prng.c version.c version.h
nwipe_SOURCES = context.h isaac_rand/isaac_rand.c logging.h options.h prng.h nwipe.c gui.c isaac_rand/isaac_rand.h method.h pass.c device.c gui.h isaac_rand/isaac_standard.h mt19937ar-cok/mt19937ar-cok.c nwipe.h mt19937ar-cok/mt19937ar-cok.h pass.h device.h logging.c method.c options.c prng.c version.c version.h
nwipe_CFLAGS = $(PARTED_CFLAGS)
nwipe_LDADD = $(PARTED_LIBS)

View File

@@ -21,8 +21,8 @@
#include "prng.h"
#include "logging.h"
#include "mt19937ar-cok.h"
#include "isaac_rand.h"
#include "mt19937ar-cok/mt19937ar-cok.h"
#include "isaac_rand/isaac_rand.h"
nwipe_prng_t nwipe_twister = {"Mersenne Twister (mt19937ar-cok)", nwipe_twister_init, nwipe_twister_read};