From 2a8fc81203107eb3495a50fb2666803fda3e0517 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20D=C5=82ugo=C5=82=C4=99cki?= Date: Wed, 8 Apr 2015 23:22:53 +0200 Subject: [PATCH] Fix building and installing package. --- Makefile.am | 16 +++++++--------- configure.ac | 2 +- include/Makefile.am | 17 +++++++++++++++++ {src => include}/algorithm.h | 0 {src => include}/chromosome.h | 0 {src => include}/condition/condition.h | 0 .../condition/generationLimitCondition.h | 0 {src => include}/crossover/crossover.h | 0 {src => include}/fitness/example.h | 0 {src => include}/fitness/fitness.h | 0 {src => include}/fitness/wsti.h | 0 {src => include}/gene.h | 0 {src => include}/generation.h | 0 {src => include}/generator/bitGenerator.h | 0 {src => include}/generator/generator.h | 0 {src => include}/mutation/mutation.h | 0 .../selection/linearRankSelection.h | 0 {src => include}/selection/rouletteSelection.h | 0 {src => include}/selection/selection.h | 0 tests/Makefile.am | 2 +- 20 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 include/Makefile.am rename {src => include}/algorithm.h (100%) rename {src => include}/chromosome.h (100%) rename {src => include}/condition/condition.h (100%) rename {src => include}/condition/generationLimitCondition.h (100%) rename {src => include}/crossover/crossover.h (100%) rename {src => include}/fitness/example.h (100%) rename {src => include}/fitness/fitness.h (100%) rename {src => include}/fitness/wsti.h (100%) rename {src => include}/gene.h (100%) rename {src => include}/generation.h (100%) rename {src => include}/generator/bitGenerator.h (100%) rename {src => include}/generator/generator.h (100%) rename {src => include}/mutation/mutation.h (100%) rename {src => include}/selection/linearRankSelection.h (100%) rename {src => include}/selection/rouletteSelection.h (100%) rename {src => include}/selection/selection.h (100%) 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 -- 2.30.2