From: Rafał Długołęcki Date: Wed, 8 Apr 2015 21:22:53 +0000 (+0200) Subject: Fix building and installing package. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=2a8fc81203107eb3495a50fb2666803fda3e0517;p=genetic.git Fix building and installing package. --- diff --git a/Makefile.am b/Makefile.am index 77706d6..899ed06 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,9 +2,6 @@ AUTOMAKE_OPTIONS = gnu subdir-objects ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} AM_CXXFLAGS=-std=c++11 -EXTRA_DIST = \ - config.rpath - MAINTAINERCLEANFILES = \ aclocal.m4 \ config.h.in \ @@ -24,17 +21,20 @@ CLEANFILES = \ %~ \ doxyfile.stamp -SUBDIRS = . tests +SUBDIRS = include . tests + +# bin_PROGRAMS = bin/genetic +noinst_PROGRAMS = bin_genetic -bin_PROGRAMS = bin/genetic dist_noinst_SCRIPTS = autogen.sh -bin_genetic_SOURCES = \ +nodist_bin_genetic_SOURCES = \ src/main.cpp + bin_genetic_CPPFLAGS = \ $(bin_genetic_CFLAGS) \ - -I$(top_srcdir)/src \ + -I$(top_srcdir)/include \ -Wall -pedantic -Wextra \ -Wl,--export-dynamic @@ -42,5 +42,3 @@ bin_genetic_LDADD = \ $(bin_genetic_LIBS) bin_genetic_LDFLAGS = $(LTLIBINTL) - -.PHONY: diff --git a/configure.ac b/configure.ac index e8b6f95..d4d776f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ AC_INIT([Genetic], [0.2], [bugz@dlugolecki.net.pl], [genetic], [http://dlugolecki.net.pl/software/genetic/]) -AC_CANONICAL_SYSTEM AC_PREREQ([2.59]) AM_INIT_AUTOMAKE([1.10 -Wall]) AC_CONFIG_HEADERS([config.h]) AC_PROG_CXX AC_CONFIG_FILES([ Makefile + include/Makefile tests/Makefile ]) diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 0000000..2938285 --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1,17 @@ +nobase_pkginclude_HEADERS = \ + gene.h \ + chromosome.h \ + generation.h \ + algorithm.h \ + condition/condition.h \ + condition/generationLimitCondition.h \ + crossover/crossover.h \ + fitness/fitness.h \ + fitness/wsti.h \ + fitness/example.h \ + generator/generator.h \ + generator/bitGenerator.h \ + mutation/mutation.h \ + selection/selection.h \ + selection/rouletteSelection.h \ + selection/linearRankSelection.h diff --git a/src/algorithm.h b/include/algorithm.h similarity index 100% rename from src/algorithm.h rename to include/algorithm.h diff --git a/src/chromosome.h b/include/chromosome.h similarity index 100% rename from src/chromosome.h rename to include/chromosome.h diff --git a/src/condition/condition.h b/include/condition/condition.h similarity index 100% rename from src/condition/condition.h rename to include/condition/condition.h diff --git a/src/condition/generationLimitCondition.h b/include/condition/generationLimitCondition.h similarity index 100% rename from src/condition/generationLimitCondition.h rename to include/condition/generationLimitCondition.h diff --git a/src/crossover/crossover.h b/include/crossover/crossover.h similarity index 100% rename from src/crossover/crossover.h rename to include/crossover/crossover.h diff --git a/src/fitness/example.h b/include/fitness/example.h similarity index 100% rename from src/fitness/example.h rename to include/fitness/example.h diff --git a/src/fitness/fitness.h b/include/fitness/fitness.h similarity index 100% rename from src/fitness/fitness.h rename to include/fitness/fitness.h diff --git a/src/fitness/wsti.h b/include/fitness/wsti.h similarity index 100% rename from src/fitness/wsti.h rename to include/fitness/wsti.h diff --git a/src/gene.h b/include/gene.h similarity index 100% rename from src/gene.h rename to include/gene.h diff --git a/src/generation.h b/include/generation.h similarity index 100% rename from src/generation.h rename to include/generation.h diff --git a/src/generator/bitGenerator.h b/include/generator/bitGenerator.h similarity index 100% rename from src/generator/bitGenerator.h rename to include/generator/bitGenerator.h diff --git a/src/generator/generator.h b/include/generator/generator.h similarity index 100% rename from src/generator/generator.h rename to include/generator/generator.h diff --git a/src/mutation/mutation.h b/include/mutation/mutation.h similarity index 100% rename from src/mutation/mutation.h rename to include/mutation/mutation.h diff --git a/src/selection/linearRankSelection.h b/include/selection/linearRankSelection.h similarity index 100% rename from src/selection/linearRankSelection.h rename to include/selection/linearRankSelection.h diff --git a/src/selection/rouletteSelection.h b/include/selection/rouletteSelection.h similarity index 100% rename from src/selection/rouletteSelection.h rename to include/selection/rouletteSelection.h diff --git a/src/selection/selection.h b/include/selection/selection.h similarity index 100% rename from src/selection/selection.h rename to include/selection/selection.h diff --git a/tests/Makefile.am b/tests/Makefile.am index c6bac99..ada275e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -12,7 +12,7 @@ TESTS = \ noinst_PROGRAMS = $(TESTS) -AM_CXXFLAGS = -O3 -I$(top_srcdir)/src -std=c++11 +AM_CXXFLAGS = -O3 -I$(top_srcdir)/include -std=c++11 gene_create_test_SOURCES = gene/create.cpp gene_copy_test_SOURCES = gene/copy.cpp