diff --git a/Makefile b/Makefile deleted file mode 100644 index b1ccb57..0000000 --- a/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -# -*- mode: makefile-gmake; coding: utf-8 -*- - -all: - $(MAKE) -C src/libmidi all - $(MAKE) -C src all - -install: - $(MAKE) -C src install - -mkdir -p $(DESTDIR)/usr/share/linthesia/graphics - install -m 644 graphics/*.tga graphics/*.ico $(DESTDIR)/usr/share/linthesia/graphics - -.PHONY:clean -clean: - $(MAKE) -C src/libmidi clean - $(MAKE) -C src clean - diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..af437a6 --- /dev/null +++ b/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = src diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..5b8d176 --- /dev/null +++ b/configure.ac @@ -0,0 +1,38 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.69]) +AC_INIT([linthesia], [0.6.2], [victor.lavaud@gmail.com]) +AM_INIT_AUTOMAKE([foreign subdir-objects]) +#AM_LANG([C++]) +AC_CONFIG_SRCDIR([src/main.cpp]) +AC_CONFIG_HEADERS([config.h]) + +LT_PREREQ([2.2]) +LT_INIT() + +# Checks for programs. +AC_PROG_CXX +AC_PROG_INSTALL +AC_PROG_MKDIR_P +# Checks for libraries. + +# Checks for header files. +AC_CHECK_HEADERS([string string.h iostream algorithm locale vector sstream queue functional map iomanip set exception sys/time.h]) + +PKG_CHECK_MODULES([GTKGLEXTMM],[gtkglextmm-1.2]) +PKG_CHECK_MODULES([GTKMM],[gtkmm-2.4]) +PKG_CHECK_MODULES([GCONFMM],[gconfmm-2.6]) +PKG_CHECK_MODULES([ALSA],[alsa]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_CHECK_HEADER_STDBOOL +AC_C_INLINE +AC_TYPE_SIZE_T +AC_TYPE_UINT32_T + +# Checks for library functions. +AC_CHECK_FUNCS([gettimeofday]) + +AC_CONFIG_FILES([Makefile src/Makefile]) +AC_OUTPUT diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 317d68a..0000000 --- a/src/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -*- mode: makefile-gmake; coding: utf-8 -*- - -GRAPHDIR?=../graphics - -CXX = g++ -CXXFLAGS = -I . -I libmidi -Wall -Wextra -ansi -g -std=c++11 -CXXFLAGS += `pkg-config --cflags gtkmm-2.4 gconfmm-2.6 gtkglextmm-1.2 alsa` -DGRAPHDIR="\"$(GRAPHDIR)\"" -LDLIBS = `pkg-config --libs gtkmm-2.4 gconfmm-2.6 gtkglextmm-1.2 alsa` -TARGET = linthesia - -all: $(TARGET) - -$(TARGET): main.o \ - LinthesiaError.o \ - UserSettings.o \ - CompatibleSystem.o \ - FileSelector.o \ - Renderer.o \ - Tga.o \ - GameState.o \ - TitleState.o \ - TextWriter.o \ - MenuLayout.o \ - DeviceTile.o \ - StringTile.o \ - MidiComm.o \ - TrackSelectionState.o \ - TrackTile.o \ - PlayingState.o \ - StatsState.o \ - KeyboardDisplay.o \ - EdgeTracker.o \ - DrawingArea.o \ - libmidi/libmidi.a - $(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS) - -libmidi/libmidi.a: - $(MAKE) -C libmidi - -install: all - -mkdir -p $(DESTDIR)/usr/games - install -m 755 $(TARGET) -g root -o root $(DESTDIR)/usr/games/ - -.PHONY:clean -clean: - find . -name "*.o" -delete - find . -name "*~" -delete - $(RM) $(TARGET) diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..6dd1692 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,11 @@ +noinst_LTLIBRARIES = libmidi.la +libmidi_la_SOURCES = libmidi/Midi.cpp libmidi/MidiUtil.cpp libmidi/MidiTrack.cpp libmidi/MidiEvent.cpp + +GRAPHDIR = $(top_srcdir)/graphics + +bin_PROGRAMS = linthesia +linthesia_SOURCES = CompatibleSystem.cpp EdgeTracker.cpp KeyboardDisplay.cpp MenuLayout.cpp Renderer.cpp TextWriter.cpp TrackSelectionState.cpp DeviceTile.cpp FileSelector.cpp LinthesiaError.cpp MidiComm.cpp StatsState.cpp Tga.cpp TrackTile.cpp DrawingArea.cpp GameState.cpp main.cpp PlayingState.cpp StringTile.cpp TitleState.cpp UserSettings.cpp +linthesia_LDFLAGS = @GTKMM_LIBS@ @GCONFMM_LIBS@ @GTKGLEXTMM_LIBS@ @ALSA_LIBS@ +linthesia_LDADD = libmidi.la +linthesia_CXXFLAGS = -std=c++11 -iquote $(top_srcdir)/libmidi +linthesia_CPPFLAGS = @GTKMM_CFLAGS@ @GCONFMM_CFLAGS@ @GTKGLEXTMM_CFLAGS@ @ALSA_CFLAGS@ -DGRAPHDIR="\"$(GRAPHDIR)\"" diff --git a/src/libmidi/Makefile b/src/libmidi/Makefile deleted file mode 100644 index 64f5ea9..0000000 --- a/src/libmidi/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -# -*- mode: makefile-gmake; coding: utf-8 -*- - -CXX = g++ -CXXFLAGS = -I . -I .. -ansi -Wall -O2 -TARGET = libmidi.a - -all: $(TARGET) - -$(TARGET): Midi.o MidiUtil.o MidiTrack.o MidiEvent.o - ar rcs $@ $^ - -.PHONY:clean -clean: - find . -name "*.o" -delete - find . -name "*~" -delete - $(RM) $(TARGET)