Commit e979576b authored by Maxime Perrotin's avatar Maxime Perrotin

Update makefiles

parent 659176ba
ITERATORS_PREFIX?=$(HOME)/.local ITERATORS_PREFIX?=$(HOME)/.local
all: all:
@echo You can install with "sudo make install" @echo You can install with "make install"
@echo A testcase can be build from source with "make test" @echo A testcase can be build from source with "make test"
install: install:
gprinstall --uninstall asn1_iterators
gprbuild -p asn1_iterators.gpr gprbuild -p asn1_iterators.gpr
gprinstall -p -XLIBRARY_TYPE=dynamic --build-name=shared asn1_iterators.gpr gprinstall -p -XLIBRARY_TYPE=dynamic --build-name=shared asn1_iterators.gpr
install -d $(ITERATORS_PREFIX)/share/taste
install -m 644 stg/ada_iterators-iterators-adb.stg $(ITERATORS_PREFIX)/share/taste
install -m 644 stg/ada_iterators-iterators-ads.stg $(ITERATORS_PREFIX)/share/taste
install -m 644 stg/ada_iterators.stg $(ITERATORS_PREFIX)/share/taste
install -m 755 src/taste-asn1-iterators $(ITERATORS_PREFIX)/bin install -m 755 src/taste-asn1-iterators $(ITERATORS_PREFIX)/bin
#install -d /usr/share/ada/adainclude/asn1_iterators
#install -m 644 src/asn1_iterators.gpr /usr/share/ada/adainclude
#install -d /usr/lib/i386-linux-gnu/ada/adalib/asn1_iterators
#install -m 644 src/*.ad? /usr/share/ada/adainclude/asn1_iterators
#cd src && mkdir -p tmp && cd tmp && gnat make -c -O2 ../*.ad? && \
# install -m 644 *.ali /usr/lib/i386-linux-gnu/ada/adalib/asn1_iterators && \
# ar r libasn1_iterators.a *.o && cp libasn1_iterators.a /usr/lib/i386-linux-gnu && \
# cd ../.. && rm -rf src/tmp
test_build: clean
test_install: clean
mkdir -p build_test mkdir -p build_test
cp test/DataView.asn build_test cp test/DataView.asn build_test
cp test/test_generic.gpr build_test cd build_test && taste-asn1-iterators DataView.asn
cp test/test_generic.adb build_test gprbuild -p -P test_generic.gpr
cd build_test && taste-asn1-iterators DataView.asn && gprbuild test_generic.gpr
test: test_install test: test_build
build_test/test_generic build_test/test_generic
clean: clean:
@rm -rf build_test gprclean test_generic.gpr
gprclean asn1_iterators.gpr
.PHONY: all clean install test_install .PHONY: all clean install test test_build
...@@ -2,4 +2,7 @@ project asn1_iterators is ...@@ -2,4 +2,7 @@ project asn1_iterators is
for Source_Dirs use ("src"); for Source_Dirs use ("src");
for Object_Dir use "obj"; for Object_Dir use "obj";
for Languages use ("Ada"); for Languages use ("Ada");
package Install is
for Artifacts ("share/asn1_iterators/stg") use ("stg/*");
end Install;
end asn1_iterators; end asn1_iterators;
with "asn1_iterators"; with "asn1_iterators";
project test_generic is project test_generic is
for Source_Dirs use (".", "./iterators"); for Source_Dirs use ("test", "build_test/iterators");
for Main use ("test_generic.adb"); for Main use ("test_generic.adb");
for Object_Dir use "build_test";
end test_generic; end test_generic;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment