]> infiniteadaptability.org Git - cold/commitdiff
...
authoralex <[email protected]>
Tue, 10 May 2022 06:10:37 +0000 (23:10 -0700)
committeralex <[email protected]>
Tue, 10 May 2022 06:10:37 +0000 (23:10 -0700)
.gitignore [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
configure.ac [new file with mode: 0644]
inc/main.h [new file with mode: 0644]
src/main.c [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..0baa996
--- /dev/null
@@ -0,0 +1,31 @@
+# autoconf/make
+autom4te.cache/
+autoscan.log
+aclocal.m4
+build-aux/
+config.h.in
+config.h
+config.h.in~
+config.log
+config.status
+configure
+configure.scan
+*.in
+*.in~
+**/.deps
+**/.dirstamp
+**/Makefile
+**/Makefile.in
+stamp-h1
+
+# tags
+tags
+
+# build objects
+*.o
+*.log
+*.trs
+*.tests
+
+# binaries
+cold
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..c69add9
--- /dev/null
@@ -0,0 +1,11 @@
+AM_CPPFLAGS = \
+       -Wall \
+       -Werror
+
+bin_PROGRAMS = cold
+
+cold_SOURCES = \
+       src/main.c
+
+cold_SOURCES += \
+       inc/main.h
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..c486633
--- /dev/null
@@ -0,0 +1,26 @@
+AC_PREREQ([2.69])
+AC_INIT([cold], [0.0.0])
+
+# Store build files not in main directory
+AC_CONFIG_AUX_DIR([build-aux])
+
+AM_INIT_AUTOMAKE([foreign subdir-objects -Wall -Werror])
+
+AC_CONFIG_SRCDIR([src/main.c])
+AC_CONFIG_HEADERS([inc/config.h])
+
+# Checks for programs.
+AC_PROG_CC
+
+# Checks for libraries.
+AC_CHECK_LIB([udev],[udev_new])
+
+# Checks for header files.
+AC_CHECK_HEADERS([stdlib.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Checks for library functions.
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/inc/main.h b/inc/main.h
new file mode 100644 (file)
index 0000000..b073e2d
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef __MAIN_H_
+#define __MAIN_H_
+
+#include<stdlib.h>
+
+#include<libudev.h>
+
+int main(int,char**);
+
+#endif
diff --git a/src/main.c b/src/main.c
new file mode 100644 (file)
index 0000000..c38e52a
--- /dev/null
@@ -0,0 +1,12 @@
+#include<main.h>
+
+int main(int argc, char **argv) {
+       struct udev *monitor;
+
+       monitor = udev_new();
+       if(NULL==monitor) { return EXIT_FAILURE; }
+
+       udev_unref(monitor);
+
+       return EXIT_SUCCESS;
+}