Write Autotools configuration
Add Autotools configuration files for building binaries.
This commit is contained in:
parent
1de5aaf36a
commit
35560c46ea
9 changed files with 188 additions and 0 deletions
39
.gitignore
vendored
39
.gitignore
vendored
|
|
@ -1,2 +1,41 @@
|
|||
# Only include required source files.
|
||||
# Do no include any binaries or libraries/external sources.
|
||||
# Submodules are not added here, as they are managed by Git automatically.
|
||||
*
|
||||
*/
|
||||
|
||||
# /
|
||||
!.gitignore
|
||||
!.gitignores
|
||||
!AUTHORS
|
||||
!build.sh
|
||||
!CHANGELOG
|
||||
!configure.ac
|
||||
!LICENSE
|
||||
!Makefile.am
|
||||
!README
|
||||
!TODO
|
||||
|
||||
# /docs
|
||||
!/docs/
|
||||
/docs/*
|
||||
|
||||
!/docs/1.O_LEGAL
|
||||
/docs/1.0_LEGAL/*
|
||||
|
||||
!/docs/1.0_LEGAL/1.1_PRIVACY
|
||||
|
||||
# /src
|
||||
!/src/
|
||||
/src/*
|
||||
|
||||
!/src/gdextension_interface.h
|
||||
!/src/Makefile.am
|
||||
!/src/main.c
|
||||
!/src/main.gdextension
|
||||
!/src/main.h
|
||||
|
||||
# Godot 4+ specific ignores
|
||||
.godot/
|
||||
|
||||
|
||||
|
|
|
|||
6
AUTHORS
Normal file
6
AUTHORS
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
AUTHORS
|
||||
=======
|
||||
|
||||
Aidan Mullen
|
||||
|
||||
--- end of AUTHORS ---
|
||||
7
CHANGELOG
Executable file
7
CHANGELOG
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
CHANGELOG
|
||||
=========
|
||||
|
||||
0.1.0
|
||||
-----
|
||||
|
||||
--- end of CHANGELOG ---
|
||||
3
Makefile.am
Normal file
3
Makefile.am
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
AUTOMAKE_OPTIONS = foreign # Do not generate GNU files (COPYING, etc.)
|
||||
SUBDIRS = src # Source subdirectory.
|
||||
ACLOCAL_AMFLAGS = -I m4 # Autoconf flags; m4 is the language used.
|
||||
37
README
Executable file
37
README
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
RTR
|
||||
===
|
||||
|
||||
RTR source repository.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
The following dependencies will need to be installed as per the instructions
|
||||
for your system; heavily shared library-oriented systems may need all of these
|
||||
installed to run the compiled binary.
|
||||
|
||||
- Godot
|
||||
- Vulkan
|
||||
|
||||
Build
|
||||
-----
|
||||
|
||||
The recommended build procedure requires the following installations:
|
||||
- Git
|
||||
- GNU Autotools
|
||||
- UNIX Shell
|
||||
|
||||
1.) Install the dependencies listed above.
|
||||
|
||||
2.) Clone this repository with all submodules.
|
||||
a.) Run the following command:
|
||||
git clone --recurse-submodules -j8 -b {branch} {URL to this
|
||||
repository}
|
||||
No submodules have been added yet.
|
||||
|
||||
3.) Run "build.sh" within a UNIX shell.
|
||||
|
||||
Project organized in conformance to the Straightforward C Project Standard 5
|
||||
(SCPS5).
|
||||
|
||||
--- end of README ---
|
||||
4
TODO
Normal file
4
TODO
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
TODO
|
||||
====
|
||||
|
||||
--- end of TODO ---
|
||||
15
build.sh
Normal file
15
build.sh
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Build Script
|
||||
|
||||
# Run Autotools
|
||||
libtoolize
|
||||
aclocal
|
||||
autoconf
|
||||
autoheader
|
||||
automake --add-missing
|
||||
|
||||
# Run Generated Files
|
||||
# Disable static linking and enable GUI component; builds complete version.
|
||||
./configure --disable-static --enable-shared --enable-extra=yes
|
||||
make
|
||||
63
configure.ac
Normal file
63
configure.ac
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
# Title, version, etc.
|
||||
AC_INIT(\
|
||||
[RTR], \
|
||||
[0.1.0], \
|
||||
[mail@acm.contact], \
|
||||
[rtr], \
|
||||
[https://www.delay.cloud/] \
|
||||
)
|
||||
|
||||
# AC_CHECK_LIB is not utilized, since it checks the presence of libraries by
|
||||
# linking them to test program; this process introduces more overhead and longer
|
||||
# build times.
|
||||
|
||||
# Define BUILD in order to enable inclusion of config.h, which will act as the
|
||||
# Autoheader.
|
||||
AC_DEFINE([BUILD], [1], [Build system enabled.])
|
||||
AM_CONFIG_HEADER([src/config.h])
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4
|
||||
])
|
||||
|
||||
# Do not generate GNU project files and disable some checks.
|
||||
# Includes flags to strictly compile Standard C89.
|
||||
AM_INIT_AUTOMAKE([\
|
||||
foreign \
|
||||
-Wall \
|
||||
-Werror \
|
||||
-Wno-portability \
|
||||
subdir-objects \
|
||||
])
|
||||
|
||||
# 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"])
|
||||
])
|
||||
|
||||
# Locations of generated Makefiles.
|
||||
AC_CONFIG_FILES([\
|
||||
Makefile \
|
||||
src/Makefile \
|
||||
])
|
||||
|
||||
# Primary SDT.
|
||||
AC_CONFIG_SRCDIR([src/main.c])
|
||||
|
||||
|
||||
CFLAGS="$CFLAGS -std=c89 -pedantic-errors -Wall -Wold-style-definition -Wextra \
|
||||
-Wmissing-prototypes -Wstrict-prototypes" # Compile to C89
|
||||
# without
|
||||
# GNU extensions.
|
||||
# Warnings on.
|
||||
|
||||
LT_INIT([shared disable-static]) # Start GNU Libtool. Satic libraries
|
||||
# disabled; shared/dynamic linking.
|
||||
|
||||
AC_PROG_CC([gcc]) # Autoconf for C compiler; obviously set to use GCC.
|
||||
|
||||
AC_OUTPUT # Generate files.
|
||||
|
||||
# Possibly add echo here.
|
||||
14
src/Makefile.am
Normal file
14
src/Makefile.am
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# 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.
|
||||
|
||||
# -Bshared sets preference for shared libraries.
|
||||
# No libraries are currently linked here.
|
||||
AM_CFLAGS = "-I$(srcdir) \
|
||||
-Bshared
|
||||
endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue