shithub: duke3d

Download patch

ref: b17c971a8b01db8fababd751c2103561a9b9cd00
parent: 28cc30cfe94d44445251c63d69cc9572cb17ead8
author: Marshall Banana <djcj@gmx.de>
date: Sat May 2 18:43:45 EDT 2015

Add GNU automake files

--- /dev/null
+++ b/Engine/src/Makefile.am
@@ -1,0 +1,3 @@
+noinst_LIBRARIES = libEngine.a
+libEngine_a_SOURCES = cache.c display.c draw.c dummy_multi.c engine.c filesystem.c fixedPoint_math.c mmulti.c network.c tiles.c
+libEngine_a_CFLAGS = -I$(top_srcdir)/Game/src
--- /dev/null
+++ b/Game/src/Makefile.am
@@ -1,0 +1,11 @@
+SUBDIRS = audiolib midi
+
+noinst_LIBRARIES = libGame.a
+libGame_a_SOURCES = \
+	actors.c animlib.c config.c console.c control.c cvar_defs.c cvars.c dummy_audiolib.c game.c \
+	gamedef.c global.c keyboard.c menues.c player.c premap.c rts.c scriplib.c sector.c sounds.c
+libGame_a_LIBADD = audiolib/libaudio.a midi/libmidi.a
+libGame_a_CFLAGS = -I$(top_srcdir)/Engine/src
+
+# starting a new game will lead to a crash if built with -O1/-O2/-O3
+premap.o: CFLAGS+=-O0
--- /dev/null
+++ b/Game/src/audiolib/Makefile.am
@@ -1,0 +1,4 @@
+noinst_LIBRARIES = libaudio.a
+libaudio_a_SOURCES = fx_man.c dsl.c ll_man.c multivoc.c mv_mix.c mvreverb.c nodpmi.c pitch.c user.c usrhooks.c
+
+AM_CFLAGS = -I$(top_srcdir)/Engine/src
--- /dev/null
+++ b/Game/src/midi/Makefile.am
@@ -1,0 +1,3 @@
+noinst_LIBRARIES = libmidi.a
+libmidi_a_SOURCES = sdl_midi.c
+libmidi_a_CFLAGS = -I$(top_srcdir)/Engine/src
--- /dev/null
+++ b/Makefile.am
@@ -1,0 +1,15 @@
+SUBDIRS = Game/src Engine/src
+
+bin_PROGRAMS = chocolate-duke3d
+chocolate_duke3d_SOURCES =
+chocolate_duke3d_LDADD = \
+	Game/src/libGame.a \
+	Game/src/audiolib/libaudio.a \
+	Game/src/midi/libmidi.a \
+	Engine/src/libEngine.a \
+	$(SDL_LIBS) $(SDL_MIXER_LIBS)
+
+doc_DATA = README.md
+
+pixmapdir = $(datadir)/pixmaps
+pixmap_DATA = Game/duke_icon.png
--- /dev/null
+++ b/autogen.sh
@@ -1,0 +1,4 @@
+#!/bin/sh
+rm -rf autom4te.cache build-aux aclocal.m4
+autoreconf -ivf
+rm -rf autom4te.cache
--- /dev/null
+++ b/configure.ac
@@ -1,0 +1,38 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_INIT([Chocolate Duke3D],
+        [1.0],
+        [https://github.com/fabiensanglard/chocolate_duke3D/issues])
+AC_CONFIG_SRCDIR([.])
+
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE([foreign])
+AM_SILENT_RULES([yes])
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_RANLIB
+
+# Checks for libraries.
+PKG_CHECK_MODULES([SDL], [sdl], [], [
+    AC_CHECK_LIB([SDL], [main], [], [exit 1])
+])
+PKG_CHECK_MODULES([SDL_MIXER], [SDL_mixer], [], [
+    AC_CHECK_LIB([SDL_mixer], [main], [], [exit 1])
+])
+
+dnl Compiler flags
+CFLAGS_WARNINGS="-Wall -Wno-pointer-sign -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-function"
+CFLAGS="${CFLAGS_WARNINGS} -DPLATFORM_UNIX $(pkg-config --cflags SDL_mixer) ${CFLAGS}"
+LDFLAGS="$(pkg-config --libs sdl) $(pkg-config --libs SDL_mixer) ${LDFLAGS}"
+
+# Checks for header files.
+AC_CHECK_HEADERS([assert.h enet/enet.h])
+
+AC_CONFIG_FILES([Engine/src/Makefile
+                 Game/src/Makefile
+                 Game/src/audiolib/Makefile
+                 Game/src/midi/Makefile
+                 Makefile])
+AC_OUTPUT