Update the .gpr files to build a proper shared library

This commit is contained in:
R. Tyler Croy 2011-03-21 22:14:01 -07:00
parent b7519a256a
commit 50418968bb
4 changed files with 33 additions and 15 deletions

View File

@ -5,27 +5,30 @@ GPRBUILD=gprbuild
GPRCLEAN=gprclean
TESTRUNNER=testrunner
lib:
pre:
mkdir -p build
mkdir -p obj
lib: pre
$(GPRBUILD) -p memcache.gpr
syntax:
mkdir -p build
syntax: pre
gnatmake -gnatc -gnat05 -P memcache.gpr
gnatmake -gnatc -gnat05 -P memcachetest.gpr
test: syntax
test: pre lib syntax
$(GPRBUILD) -p memcachetest.gpr
$(GPRBUILD) -p memcachetestxml.gpr
./$(TESTRUNNER)
inttest: syntax lib test
inttest: pre syntax lib test
(cd integrationtests && python buildtests.py)
(cd integrationtests && python runtests.py)
clean:
clean: pre
$(GPRCLEAN) memcache.gpr
$(GPRCLEAN) memcachetest.gpr
(cd integrationtests && python clean.py)
rm -rf build
rm -rf build ob
rm -f $(TESTRUNNER)
rm -f *.so*

View File

@ -1,12 +1,25 @@
project Memcache is
Library project Memcache is
Version := "1.0.0";
type Mode_Type is ("debug", "release");
Mode : Mode_Type := external ("mode", "debug");
for Source_Dirs use ("client");
for Object_Dir use "build";
for Exec_Dir use ".";
for Object_Dir use "obj";
for Library_Dir use "build";
for Library_Kind use "dynamic";
for Library_Name use "memcache";
for Library_Version use "libmemcache.so." & Version;
package Compiler is
for Default_Switches("ada") use
("-O2", "-gnat05");
case Mode is
when "debug" =>
for Switches ("Ada") use ("-g", "-gnat05");
when "release" =>
for Switches ("Ada") use ("-O2", "-gnat05");
end case;
end Compiler;
end Memcache;

View File

@ -1,9 +1,10 @@
with "aunit";
with "memcache";
project MemcacheTest is
for Source_Dirs use ("tests/harness", "client", "tests/scenarios");
for Source_Dirs use ("tests/harness", "tests/scenarios");
for Main use ("testrunner.adb");
for Object_Dir use "build";
for Object_Dir use "obj";
for Exec_Dir use ".";
package Compiler is

View File

@ -1,7 +1,8 @@
with "aunit";
with "memcache";
project MemcacheTest is
for Source_Dirs use ("tests/harness", "client", "tests/scenarios");
for Source_Dirs use ("tests/harness", "tests/scenarios");
for Main use ("xmlrunner.adb");
for Object_Dir use "build";
for Exec_Dir use ".";