From 34cd6fdc58865d04acf7bed3f72b0ebd6dab55c5 Mon Sep 17 00:00:00 2001 From: Aidan Mullen Date: Fri, 3 May 2024 22:00:06 -0400 Subject: [PATCH] Modify Autotools scripts Modify Autotools scripts to output shared library. --- .gitignore | 3 +-- build.sh | 2 +- configure.ac | 14 +++++++------- docs/1.1_PRIVACY | 4 ++++ src/Makefile.am | 22 ++++++++++++---------- src/main.c | 13 +++++++++++++ 6 files changed, 38 insertions(+), 20 deletions(-) create mode 100644 docs/1.1_PRIVACY diff --git a/.gitignore b/.gitignore index 200f737..1467019 100644 --- a/.gitignore +++ b/.gitignore @@ -20,8 +20,7 @@ !/docs/ /docs/* -!/docs/1.O_LEGAL -/docs/1.0_LEGAL/* +!/docs/1.1_PRIVACY !/docs/1.0_LEGAL/1.1_PRIVACY diff --git a/build.sh b/build.sh index e3ffb50..70066d6 100644 --- a/build.sh +++ b/build.sh @@ -11,5 +11,5 @@ automake --add-missing # Run Generated Files # Disable static linking and enable GUI component; builds complete version. -./configure --disable-static --enable-shared --enable-extra=yes +./configure --disable-static --enable-shared make diff --git a/configure.ac b/configure.ac index d76c1bb..004e182 100644 --- a/configure.ac +++ b/configure.ac @@ -30,12 +30,12 @@ AM_INIT_AUTOMAKE([\ ]) # Option to enable extras. -AC_ARG_ENABLE([extra], - AS_HELP_STRING([--enable-extra], [Enable features])) -AS_IF([test "x$enable_extra" = "xyes"], [ - AC_DEFINE([EXTRA], [1], [Enable extra features.]) - AM_CONDITIONAL([EXTRA], [test "x$enable_extra" = "xyes"]) -]) +#AC_ARG_ENABLE([extra], +# AS_HELP_STRING([--enable-extra], [Enable features])) +#AS_IF([test "x$enable_extra" = "xyes"], [ +# AC_DEFINE([EXTRA], [1], [Enable extra features.]) +# AM_CONDITIONAL([EXTRA], [test "x$enable_extra" = "xyes"]) +#]) # Locations of generated Makefiles. AC_CONFIG_FILES([\ @@ -47,7 +47,7 @@ AC_CONFIG_FILES([\ AC_CONFIG_SRCDIR([src/main.c]) -CFLAGS="$CFLAGS -std=c89 -pedantic-errors -Wall -Wold-style-definition -Wextra \ +CFLAGS="$CFLAGS -std=c11 -pedantic-errors -Wall -Wold-style-definition -Wextra \ -Wmissing-prototypes -Wstrict-prototypes" # Compile to C89 # without # GNU extensions. diff --git a/docs/1.1_PRIVACY b/docs/1.1_PRIVACY new file mode 100644 index 0000000..0e6ca23 --- /dev/null +++ b/docs/1.1_PRIVACY @@ -0,0 +1,4 @@ +1.1 PRIVACY +=========== + +--- end of 1.1 PRIVACY --- diff --git a/src/Makefile.am b/src/Makefile.am index d07fd8d..2dee601 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,14 +1,16 @@ # Makefile for primary source directory. -SUBDIRS = extra # Subdirectory for GUI. -bin_PROGRAMS = $(top_builddir)/bin/rtr # Program name. -__top_builddir__bin_rtr_CFLAGS = -DBUILD # Define BUILD preprocessor variable. -__top_builddir__bin_rtr_SOURCES = main.c # Sources - -if extra -__top_builddir__bin_rtr_LDADD = ./extra/libextra.la # Include extra. +#SUBDIRS = extra # Subdirectory for GUI. +#bin_PROGRAMS = $(top_builddir)/bin/rtr # Program name. +#__top_builddir__bin_rtr_CFLAGS = -DBUILD # Define BUILD variable. +#__top_builddir__bin_rtr_SOURCES = main.c # Sources +bin_PROGRAMS = rtr +rtr_CFLAGS = -DBUILD -c -fPIC # Define BUILD variable. +rtr_SOURCES = main.c # Sources +#if extra +#__top_builddir__bin_rtr_LDADD = ./extra/libextra.la # Include extra. # -Bshared sets preference for shared libraries. # No libraries are currently linked here. -AM_CFLAGS = "-I$(srcdir) \ - -Bshared -endif +#AM_CFLAGS = "-I$(srcdir) \ +# -Bshared +#endif diff --git a/src/main.c b/src/main.c index e9651d5..c890817 100644 --- a/src/main.c +++ b/src/main.c @@ -5,3 +5,16 @@ */ #include "main.h" +#include + +/* This file is included in the repository since using a Git submodule would + * requried cloning the entire Godot source. */ +#include "gdextension_interface.h" /* GDExtension header for Godot. */ + +/* +int main() +{ + printf("Starting./n"); + return(0); +} +*/