File: GNUmakefile

package info (click to toggle)
liblog4ada 1.3.1.b6dafb49-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 572 kB
  • sloc: ada: 3,168; makefile: 33; sh: 14
file content (56 lines) | stat: -rw-r--r-- 1,826 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
CPUS := $(shell getconf _NPROCESSORS_ONLN)
INSTALL := $(HOME)
ADA_PROJECT_PATH := $(dir $(shell which gnatls))../include
FILES=$(wildcard client/src/*.ad[sb])
ALI_BASE=log4ada-events.ali log4ada.ali log4ada-filters.ali \
log4ada-appenders.ali log4ada-loggers.ali log4ada-appenders-consoles.ali \
log4ada-appenders-buffers.ali \
log4ada-socket_utilities.ali log4ada-appenders-files.ali log4ada-types.ali \
log4ada-appenders-tcp_stream.ali options.ali log4ada-appenders-xml.ali \
log4ada-appenders-soap.ali
ALI_FILES=$(addprefix obj-shared/,$(ALI_BASE))
ANNEX_E_FILES=$(wildcard server/src_annex_e/*.ad[sb])
DIRS=client server

all:
	for i in $(DIRS);do ADA_PROJECT_PATH=$(ADA_PROJECT_PATH) make -C $$i; \
	done

clean:
	for i in $(DIRS);do make -C $$i clean;done
	rm -f *~

distclean:
	for i in $(DIRS);do make -C $$i distclean;done
	rm -f *~
	rm -Rf obj-*
	rm -Rf lib

.PHONY:shared_library static_library

soap_server:
	ADA_PROJECT_PATH=$(ADA_PROJECT_PATH) make -C server soap_logger

install:shared_library static_library
	gprinstall -aP$(ADA_PROJECT_PATH) --build-var=LIBRARY_TYPE \
	-p -f --build-name=relocatable \
	-XLIBRARY_TYPE=relocatable \
	--prefix=$(INSTALL) log4ada.gpr
	gprinstall -aP$(ADA_PROJECT_PATH) --build-var=LIBRARY_TYPE --build-name=static \
	-p -f -XLIBRARY_TYPE=static \
	--prefix=$(INSTALL) log4ada.gpr
#	mkdir -p $(INSTALL)/bin
	mkdir -p $(INSTALL)/include/log4ada/annex_e
#	cp -f server/obj_logger/soap_logger_main $(INSTALL)/bin
	cp -f log4ada_annex_e.gpr $(INSTALL)/include/log4ada_annex_e.gpr
	cp -f $(ANNEX_E_FILES) $(INSTALL)/include/log4ada/annex_e

shared_library:
	ADA_PROJECT_PATH=$(ADA_PROJECT_PATH) \
	gnatmake -p -j$(CPUS) -Plog4ada.gpr \
	-XLIBRARY_TYPE=relocatable

static_library:
	ADA_PROJECT_PATH=$(ADA_PROJECT_PATH) \
	gnatmake -p -j$(CPUS) -Plog4ada.gpr \
	-XLIBRARY_TYPE=static