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
|
SYS := $(shell gcc -dumpmachine)
ifeq ($(OS),Windows_NT)
OS := Windows_NT
else
ifneq (, $(findstring darwin, $(SYS)))
OS := osx
else
OS := unix
endif
endif
ifeq ($(OS),Windows_NT)
LN = cp -p
else
LN = ln -s
endif
GPRBUILD=gprbuild
GPRBUILD_FLAGS=
PYTHON=python
Build?=Debug
ifeq ($(Build),Production)
GPRBUILD_BUILD_TYPE_FLAGS=-XBuild=Production -XOS=${OS} -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable
else
GPRBUILD_BUILD_TYPE_FLAGS=-XBuild=Debug -XOS=${OS} -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable
endif
.PHONY: default resources do_links all clean
default: all
gps_and_cli: all
$(MAKE) -C ../cli all
include ../Makefile.gnat
# NOTE: we need to build gnatcoll separately, since we cannot use
# gnat.adc (No_Tasking restriction) on all gnatcoll sources.
all: resources do_links
cd ../kernel/src; ${PYTHON} hooks.py
cd ../kernel/generated; gnatcoll_db2ada \
-api=GPS.Kernel.Properties.Database -adacreate -dbtype sqlite\
-dbmodel=../src/properties_schema.txt
ifeq ($(OS),Windows_NT)
for f in ../kernel/generated/*; do cat $$f | tr -d '\015' > $$f-aux; mv -f $$f-aux $$f; done
endif
$(GPRBUILD) $(GPRBUILD_FLAGS) -m -p -ws \
$(GPRBUILD_BUILD_TYPE_FLAGS) -Pgps -largs `pkg-config gmodule-2.0 --libs`
resources:
ifeq ($(OS),Windows_NT)
@cd src; windres gps.rc -O coff -o ../obj/gps.res
$(MAKE) -s -C ../common/expect
endif
# If gnatlib/gnat_src exists, we use symbolic links to find the files we
# need, otherwise we assume that cron-src has put them in gnat/ already.
# Those few files are needed to generate support plug-ins for GPS.
do_links:
ifneq ($(wildcard ../gnat_src),)
-@$(foreach f,$(GNAT_SOURCES), \
$(LN) ../gnat_src/$(f) ../gnat > /dev/null 2>&1 ;)
endif
install:
$(MAKE) -C .. install
clean:
ifeq ($(OS),Windows_NT)
$(MAKE) -s -C ../common/expect clean
endif
-gprclean -q -r -Pgps
|