From a6c59ae5f0090aa6fb6127fadb5827c455c2af31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oona=20Ra=CC=88isa=CC=88nen?= Date: Mon, 20 Jul 2015 21:57:29 +0300 Subject: [PATCH] preparing port to C++11 --- Makefile | 20 -------------------- Makefile.am | 2 ++ configure.ac | 10 ++++++++++ src/Makefile.am | 4 ++++ common.c => src/common.cc | 0 common.h => src/common.h | 0 fsk.c => src/fsk.cc | 0 gui.c => src/gui.cc | 0 modespec.c => src/modespec.cc | 0 pcm.c => src/pcm.cc | 0 slowrx.c => src/slowrx.cc | 0 sync.c => src/sync.cc | 0 video.c => src/video.cc | 0 vis.c => src/vis.cc | 0 aboutdialog.ui => ui/aboutdialog.ui | 0 prefs.ui => ui/prefs.ui | 0 slowrx.ui => ui/slowrx.ui | 2 +- 17 files changed, 17 insertions(+), 21 deletions(-) delete mode 100644 Makefile create mode 100644 Makefile.am create mode 100644 configure.ac create mode 100644 src/Makefile.am rename common.c => src/common.cc (100%) rename common.h => src/common.h (100%) rename fsk.c => src/fsk.cc (100%) rename gui.c => src/gui.cc (100%) rename modespec.c => src/modespec.cc (100%) rename pcm.c => src/pcm.cc (100%) rename slowrx.c => src/slowrx.cc (100%) rename sync.c => src/sync.cc (100%) rename video.c => src/video.cc (100%) rename vis.c => src/vis.cc (100%) rename aboutdialog.ui => ui/aboutdialog.ui (100%) rename prefs.ui => ui/prefs.ui (100%) rename slowrx.ui => ui/slowrx.ui (99%) diff --git a/Makefile b/Makefile deleted file mode 100644 index dc38a36..0000000 --- a/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -CC = gcc - -CFLAGS = -Wall -Wextra -std=gnu99 -pedantic -g -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_4 -GTKCFLAGS = `pkg-config --cflags gtk+-3.0` -GTKLIBS = `pkg-config --libs gtk+-3.0` - -OFLAGS = -O3 - -OBJECTS = common.o modespec.o gui.o video.o vis.o sync.o pcm.o fsk.o slowrx.o - -all: slowrx - -slowrx: $(OBJECTS) - $(CC) $(CFLAGS) -o $@ $(OBJECTS) $(GTKLIBS) -lfftw3 -lgthread-2.0 -lasound -lm -lpthread - -%.o: %.c common.h - $(CC) $(CFLAGS) $(GTKCFLAGS) $(OFLAGS) -c -o $@ $< - -clean: - rm -f slowrx $(OBJECTS) diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..c6231c2 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,2 @@ +SUBDIRS = src +dist_doc_DATA = README.md diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..bf8f559 --- /dev/null +++ b/configure.ac @@ -0,0 +1,10 @@ +AC_INIT([slowrx], [0.1], [oona@kapsi.fi]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign]) +AC_PROG_CXX +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_FILES([ + Makefile + src/Makefile +]) +PKG_CHECK_MODULES([GTKMM], [gtkmm-3.0 >= 3.8.0]) +AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..3aeacc4 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = slowrx +slowrx_CPPFLAGS = $(GTKMM_CFLAGS) +slowrx_LDADD = $(GTKMM_LIBS) +slowrx_SOURCES = slowrx.cc common.cc gui.cc fsk.cc modespec.cc pcm.cc sync.cc video.cc vis.cc diff --git a/common.c b/src/common.cc similarity index 100% rename from common.c rename to src/common.cc diff --git a/common.h b/src/common.h similarity index 100% rename from common.h rename to src/common.h diff --git a/fsk.c b/src/fsk.cc similarity index 100% rename from fsk.c rename to src/fsk.cc diff --git a/gui.c b/src/gui.cc similarity index 100% rename from gui.c rename to src/gui.cc diff --git a/modespec.c b/src/modespec.cc similarity index 100% rename from modespec.c rename to src/modespec.cc diff --git a/pcm.c b/src/pcm.cc similarity index 100% rename from pcm.c rename to src/pcm.cc diff --git a/slowrx.c b/src/slowrx.cc similarity index 100% rename from slowrx.c rename to src/slowrx.cc diff --git a/sync.c b/src/sync.cc similarity index 100% rename from sync.c rename to src/sync.cc diff --git a/video.c b/src/video.cc similarity index 100% rename from video.c rename to src/video.cc diff --git a/vis.c b/src/vis.cc similarity index 100% rename from vis.c rename to src/vis.cc diff --git a/aboutdialog.ui b/ui/aboutdialog.ui similarity index 100% rename from aboutdialog.ui rename to ui/aboutdialog.ui diff --git a/prefs.ui b/ui/prefs.ui similarity index 100% rename from prefs.ui rename to ui/prefs.ui diff --git a/slowrx.ui b/ui/slowrx.ui similarity index 99% rename from slowrx.ui rename to ui/slowrx.ui index 85e5d62..7bc64c7 100644 --- a/slowrx.ui +++ b/ui/slowrx.ui @@ -22,7 +22,7 @@ False 885 633 - False + True