Update the .gpr files to build a proper shared library
This commit is contained in:
parent
b7519a256a
commit
50418968bb
17
Makefile
17
Makefile
|
@ -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*
|
||||
|
|
23
memcache.gpr
23
memcache.gpr
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ".";
|
||||
|
|
Loading…
Reference in New Issue