Modify Autotools scripts
Modify Autotools scripts to output shared library.
This commit is contained in:
parent
35560c46ea
commit
34cd6fdc58
6 changed files with 38 additions and 20 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -20,8 +20,7 @@
|
||||||
!/docs/
|
!/docs/
|
||||||
/docs/*
|
/docs/*
|
||||||
|
|
||||||
!/docs/1.O_LEGAL
|
!/docs/1.1_PRIVACY
|
||||||
/docs/1.0_LEGAL/*
|
|
||||||
|
|
||||||
!/docs/1.0_LEGAL/1.1_PRIVACY
|
!/docs/1.0_LEGAL/1.1_PRIVACY
|
||||||
|
|
||||||
|
|
|
||||||
2
build.sh
2
build.sh
|
|
@ -11,5 +11,5 @@ automake --add-missing
|
||||||
|
|
||||||
# Run Generated Files
|
# Run Generated Files
|
||||||
# Disable static linking and enable GUI component; builds complete version.
|
# Disable static linking and enable GUI component; builds complete version.
|
||||||
./configure --disable-static --enable-shared --enable-extra=yes
|
./configure --disable-static --enable-shared
|
||||||
make
|
make
|
||||||
|
|
|
||||||
14
configure.ac
14
configure.ac
|
|
@ -30,12 +30,12 @@ AM_INIT_AUTOMAKE([\
|
||||||
])
|
])
|
||||||
|
|
||||||
# Option to enable extras.
|
# Option to enable extras.
|
||||||
AC_ARG_ENABLE([extra],
|
#AC_ARG_ENABLE([extra],
|
||||||
AS_HELP_STRING([--enable-extra], [Enable features]))
|
# AS_HELP_STRING([--enable-extra], [Enable features]))
|
||||||
AS_IF([test "x$enable_extra" = "xyes"], [
|
#AS_IF([test "x$enable_extra" = "xyes"], [
|
||||||
AC_DEFINE([EXTRA], [1], [Enable extra features.])
|
# AC_DEFINE([EXTRA], [1], [Enable extra features.])
|
||||||
AM_CONDITIONAL([EXTRA], [test "x$enable_extra" = "xyes"])
|
# AM_CONDITIONAL([EXTRA], [test "x$enable_extra" = "xyes"])
|
||||||
])
|
#])
|
||||||
|
|
||||||
# Locations of generated Makefiles.
|
# Locations of generated Makefiles.
|
||||||
AC_CONFIG_FILES([\
|
AC_CONFIG_FILES([\
|
||||||
|
|
@ -47,7 +47,7 @@ AC_CONFIG_FILES([\
|
||||||
AC_CONFIG_SRCDIR([src/main.c])
|
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
|
-Wmissing-prototypes -Wstrict-prototypes" # Compile to C89
|
||||||
# without
|
# without
|
||||||
# GNU extensions.
|
# GNU extensions.
|
||||||
|
|
|
||||||
4
docs/1.1_PRIVACY
Normal file
4
docs/1.1_PRIVACY
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
1.1 PRIVACY
|
||||||
|
===========
|
||||||
|
|
||||||
|
--- end of 1.1 PRIVACY ---
|
||||||
|
|
@ -1,14 +1,16 @@
|
||||||
# Makefile for primary source directory.
|
# Makefile for primary source directory.
|
||||||
SUBDIRS = extra # Subdirectory for GUI.
|
#SUBDIRS = extra # Subdirectory for GUI.
|
||||||
bin_PROGRAMS = $(top_builddir)/bin/rtr # Program name.
|
#bin_PROGRAMS = $(top_builddir)/bin/rtr # Program name.
|
||||||
__top_builddir__bin_rtr_CFLAGS = -DBUILD # Define BUILD preprocessor variable.
|
#__top_builddir__bin_rtr_CFLAGS = -DBUILD # Define BUILD variable.
|
||||||
__top_builddir__bin_rtr_SOURCES = main.c # Sources
|
#__top_builddir__bin_rtr_SOURCES = main.c # Sources
|
||||||
|
bin_PROGRAMS = rtr
|
||||||
if extra
|
rtr_CFLAGS = -DBUILD -c -fPIC # Define BUILD variable.
|
||||||
__top_builddir__bin_rtr_LDADD = ./extra/libextra.la # Include extra.
|
rtr_SOURCES = main.c # Sources
|
||||||
|
#if extra
|
||||||
|
#__top_builddir__bin_rtr_LDADD = ./extra/libextra.la # Include extra.
|
||||||
|
|
||||||
# -Bshared sets preference for shared libraries.
|
# -Bshared sets preference for shared libraries.
|
||||||
# No libraries are currently linked here.
|
# No libraries are currently linked here.
|
||||||
AM_CFLAGS = "-I$(srcdir) \
|
#AM_CFLAGS = "-I$(srcdir) \
|
||||||
-Bshared
|
# -Bshared
|
||||||
endif
|
#endif
|
||||||
|
|
|
||||||
13
src/main.c
13
src/main.c
|
|
@ -5,3 +5,16 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
/* 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);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue