File: GNUmakefile

package info (click to toggle)
libxmlezout 1.06.1-12
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 244 kB
  • sloc: ada: 1,191; makefile: 23; sh: 19
file content (30 lines) | stat: -rw-r--r-- 990 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
CPUS := $(shell getconf _NPROCESSORS_ONLN)
INSTALL := $(HOME)
BUILDER                        := gnatmake
BUILDER_OPTIONS                :=
ADAFLAGS                       :=
LDFLAGS                        :=
SONAME                         := libxmlezout.so

all: dynamic_library static_library

.PHONY: all dynamic_library static_library clean install

dynamic_library static_library: %_library:
	$(BUILDER) -p -j$(CPUS) $(BUILDER_OPTIONS) -Pbuild_xmlezout_lib.gpr \
	  -XLIBRARY_KIND=$* \
	  $(foreach v,ADAFLAGS LDFLAGS SONAME,"-X$(v)=$($(v))")

clean:
	rm -fr obj-dynamic obj-static lib
	rm -f *~

install:all
	mkdir -p $(INSTALL)/lib/xmlezout
	mkdir -p $(INSTALL)/include/xmlezout
	cp -f xmlezout.gpr $(INSTALL)/include/xmlezout.gpr
	cp -f lib/libxmlezout.a lib/$(SONAME) $(INSTALL)/lib/xmlezout/
	cd $(INSTALL)/lib;ln -s xmlezout/$(SONAME);cd -
	cp -f obj-shared/*.ali $(INSTALL)/lib/xmlezout/
	chmod uog-w $(INSTALL)/lib/xmlezout/*.ali
	cp -f mckae*.ad[sb] $(INSTALL)/include/xmlezout