Skip to content

Commit

Permalink
Move main source file to src/
Browse files Browse the repository at this point in the history
- updated gitignore
- fixed headers for tests
  • Loading branch information
dmolik committed Apr 7, 2016
1 parent 5412137 commit 6e1f4f6
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 10 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
libpam/.deps/
libpam/.libs/
libpam/src/.deps/
libpam/src/.libs/

libpam/Makefile
libpam/Makefile.in
libpam/aclocal.m4
Expand All @@ -12,8 +15,10 @@ libpam/config.log
libpam/config.status
libpam/config.sub
libpam/configure

libpam/contrib/rpm.spec
!libpam/contrib/rpm.spec.in

libpam/demo
libpam/depcomp
libpam/google-authenticator
Expand All @@ -22,9 +27,15 @@ libpam/libtool
libpam/ltmain.sh
libpam/m4/
libpam/missing

libpam/*.la
libpam/*.lo
libpam/*.o
libpam/src/*.la
libpam/src/*.lo
libpam/src/*.o
libpam/src/.dirstamp

libpam/pam_google_authenticator_unittest
libpam/pam_google_authenticator_unittest.log
libpam/pam_google_authenticator_unittest.trs
Expand Down
14 changes: 7 additions & 7 deletions libpam/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ dist_html_DATA = totp.html
MODULES_LDFLAGS = -avoid-version -module -shared -export-dynamic

CORE_SRC =
CORE_SRC += base32.h base32.c
CORE_SRC += hmac.h hmac.c
CORE_SRC += sha1.h sha1.c
CORE_SRC += src/base32.h src/base32.c
CORE_SRC += src/hmac.h src/hmac.c
CORE_SRC += src/sha1.h src/sha1.c


google_authenticator_SOURCES = \
google-authenticator.c \
src/google-authenticator.c \
$(CORE_SRC)

pam_google_authenticator_la_SOURCES = \
pam_google_authenticator.c \
src/pam_google_authenticator.c \
$(CORE_SRC)
pam_google_authenticator_la_LIBADD = -lpam
pam_google_authenticator_la_CFLAGS = $(AM_CFLAGS)
Expand All @@ -31,7 +31,7 @@ check_LTLIBRARIES = libpam_google_authenticator_testing.la
TESTS = pam_google_authenticator_unittest

libpam_google_authenticator_testing_la_SOURCES = \
pam_google_authenticator.c \
src/pam_google_authenticator.c \
$(CORE_SRC)
libpam_google_authenticator_testing_la_CFLAGS = $(AM_CFLAGS) -DTESTING=1
libpam_google_authenticator_testing_la_LDFLAGS = $(AM_LDFLAGS) $(MODULES_LDFLAGS) -rpath $(abs_top_builddir)
Expand All @@ -45,7 +45,7 @@ test: check


demo_SOURCES = \
pam_google_authenticator.c \
src/pam_google_authenticator.c \
$(CORE_SRC) \
demo.c
demo_CFLAGS = $(AM_CFLAGS) -DDEMO=1
Expand Down
2 changes: 1 addition & 1 deletion libpam/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_INIT(google-authenticator, 1.01, [email protected])
AC_USE_SYSTEM_EXTENSIONS
LT_INIT
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([google-authenticator.c])
AC_CONFIG_SRCDIR([src/google-authenticator.c])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AM_MAINTAINER_MODE([enable])
AC_CONFIG_HEADER(config.h)
Expand Down
4 changes: 2 additions & 2 deletions libpam/pam_google_authenticator_unittest.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
#include <sys/types.h>
#include <unistd.h>

#include "base32.h"
#include "hmac.h"
#include "src/base32.h"
#include "src/hmac.h"

#if !defined(PAM_BAD_ITEM)
// FreeBSD does not know about PAM_BAD_ITEM. And PAM_SYMBOL_ERR is an "enum",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6e1f4f6

Please sign in to comment.