Skip to content

Commit

Permalink
Merge pull request #2 from Hurricane996/autotools
Browse files Browse the repository at this point in the history
Autotools
  • Loading branch information
Hurricane996 authored Oct 21, 2018
2 parents d5f46a9 + 5b1eff9 commit 95e5174
Show file tree
Hide file tree
Showing 14 changed files with 790 additions and 35 deletions.
58 changes: 56 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,60 @@
## EXECUTABLES
hackertyper
program_data





## AUTOTOOLS
# http://www.gnu.org/software/automake

Makefile.in
/ar-lib
/mdate-sh
/py-compile
/test-driver
/ylwrap

# http://www.gnu.org/software/autoconf

autom4te.cache
/autoscan.log
/autoscan-*.log
/aclocal.m4
/compile
/config.guess
/config.h.in
/config.log
/config.status
/config.sub
/configure
/configure.scan
/depcomp
/install-sh
/missing
/stamp-h1

# https://www.gnu.org/software/libtool/

/ltmain.sh

# http://www.gnu.org/software/texinfo

/texinfo.tex

# http://www.gnu.org/software/m4/

m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4





## C
# Prerequisites
*.d

Expand Down Expand Up @@ -52,4 +106,4 @@ program_data
modules.order
Module.symvers
Mkfile.old
dkms.conf
dkms.conf
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Lani Willrich - All files except for data/kernel.txt
Linus Torovalds - data/kernel.txt (copied from Linux source code: kernel/groups.c)
674 changes: 674 additions & 0 deletions COPYING

Large diffs are not rendered by default.

Empty file added ChangeLog
Empty file.
1 change: 1 addition & 0 deletions INSTALL
32 changes: 0 additions & 32 deletions Makefile

This file was deleted.

1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SUBDIRS = src data man
Empty file added NEWS
Empty file.
5 changes: 5 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Hackertyper - cheesy movie hacker

Hackertyper is a clone of the website [hackertyper.org](https://www.hackertyper.org/) written in C.

Hackertyper outputs text to STDOUT whenever a character is recieved from STDIN. This creates the visual effect of the user typing this arbitrary text. By default, this text is a file taken from the Linux kernel source code, however it can be specified at compile time.
40 changes: 40 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.


AC_PREREQ([2.69])
AC_INIT([hackertyper], [1.0], [])
AM_INIT_AUTOMAKE

default_programdata="data/kernel.txt"
AC_ARG_WITH([programdata],
AS_HELP_STRING([--with-programdata],[Set which data file hackertyper outputs from])
)
AC_MSG_NOTICE([$with_programdata])
AS_IF([test "x$with_programdata" != "x"],
[AC_SUBST([program_data],[`realpath $with_programdata`])],
[AC_SUBST([program_data],[`realpath $default_programdata`])]
)


AC_CONFIG_SRCDIR([src/hackertyper.c])
AC_CONFIG_HEADERS([config.h])

# Checks for programs.
AC_PROG_CC

# Checks for libraries.

# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h termios.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.
AC_CHECK_FUNCS([strtol])

AC_CONFIG_FILES([Makefile
data/Makefile
man/Makefile
src/Makefile])
AC_OUTPUT
1 change: 1 addition & 0 deletions data/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist_data_DATA = kernel.txt test_data.txt
1 change: 1 addition & 0 deletions man/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
man_MANS=hackertyper.1
8 changes: 8 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
bin_PROGRAMS = hackertyper
hackertyper_SOURCES = hackertyper.c hackertyper.h
hackertyper_LDADD = program_data.o

program_data.o:
cp @program_data@ program_data
$(LD) -r -b binary -o $@ program_data
rm program_data
2 changes: 1 addition & 1 deletion src/hackertyper.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#define AUTHOR "Lani Willrich"

#define VERSION_STRING "\
hackertyper 1.1\n\
hackertyper 1.0\n\
Copyright (C) 2018 Lani Willrich\n\
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>\n\
This is free software: you are free to change and redistribute it.\n\
Expand Down

0 comments on commit 95e5174

Please sign in to comment.