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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
VERSION=$(shell cat version)
ifndef ($(PREFIX))
PREFIX=/usr/local
endif
ifndef ($(INCLUDE_PATH))
INCLUDE_PATH=$(PREFIX)/include/$(shell basename $(PWD))
endif
ifndef ($(LIB_PATH))
LIB_PATH=$(PREFIX)/lib
endif
ifndef ($(GPR_PATH))
GPR_PATH=$(LIB_PATH)/gnat
endif
ifndef ($(GPR_INCLUDE_PATH))
GPR_INCLUDE_PATH=$(INCLUDE_PATH)
endif
ifndef ($(GPR_LIB_PATH))
GPR_LIB_PATH=$(LIB_PATH)
endif
all: libs
@make pos_libs
libs: pre_libs
@for project_file in $(PROJECT_FILES); do\
echo "Making $$project_file"; \
gnatprep "-Dversion=\"$(VERSION)\"" $$project_file{.in,}; \
gnatmake -P $$project_file; \
done
clean: gprclean extra_clean
@for project_file in $(PROJECT_FILES); do\
echo cleaning $$project_file ;\
gnatclean -P $$project_file; \
rm -f $(project_file); \
done
@rm -f $(PROJECT_FILES)
@echo "All clean"
docs:
@for docdir in $(DOCS_DIRS); do make -C $$docdir;done
gprfile:
@echo "Preparing GPR file.."
@echo version:=\"$(VERSION)\" > gpr/gnatprep.def
@echo prefix:=\"$(PREFIX)\" >> gpr/gnatprep.def
@echo lib_path:=\"$(GPR_LIB_PATH)\" >> gpr/gnatprep.def
@echo include_path:=\"$(GPR_INCLUDE_PATH)\" >> gpr/gnatprep.def
for gpr_file in $(GPR_FILES);do \
gnatprep gpr/$$gpr_file.in gpr/$$gpr_file gpr/gnatprep.def;\
done
gprclean:
@rm -f gpr/*gpr
@rm -f gpr/*.def
install: includeinstall libinstall gprinstall
gprinstall: gprfile
@echo Installing GPR files..
install -d $(GPR_PATH)
install gpr/*.gpr -t $(GPR_PATH)
make gprclean
includeinstall:
@echo Installing include and source files...
install -d $(INCLUDE_PATH)
install $(INCLUDE_FILES) -t $(INCLUDE_PATH)
libinstall:
@echo Installing library files...
install -d $(LIB_PATH)
install lib/* -t $(LIB_PATH)
showversion:
@echo $(VERSION)
|