summaryrefslogtreecommitdiffstats
path: root/tools/depends/native/JsonSchemaBuilder/Makefile
blob: 78c44339c45569512852b41723d0f464263a1838 (plain)
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
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
-include ../../Makefile.include
DEPS=Makefile

ifeq ($(NATIVEPREFIX),)
  PREFIX = $(ROOT_DIR)
else
  PREFIX = $(NATIVEPREFIX)
endif

ifeq ($(NATIVEPLATFORM),)
  PLATFORM = native
else
  PLATFORM = $(NATIVEPLATFORM)
  DEPS += ../../Makefile.include
endif

SOURCE=$(ROOT_DIR)/src

CONFIGURE=./configure --prefix=$(PREFIX)
APP=$(PLATFORM)/JsonSchemaBuilder
APPBIN=$(PREFIX)/bin/JsonSchemaBuilder

all: .installed-$(PLATFORM)

$(PLATFORM): $(DEPS)
	-rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
	cd $(PLATFORM); cp -a $(SOURCE)/* .
	cd $(PLATFORM); ./autogen.sh
	cd $(PLATFORM); $(CONFIGURE)


$(APP): $(PLATFORM)
	$(MAKE) -C $(PLATFORM)


.installed-$(PLATFORM): $(APP)
	$(MAKE) -C $(PLATFORM) install
	touch $@

clean:
	$(MAKE) -C $(PLATFORM) clean

distclean::
	rm -rf $(PLATFORM) .installed-$(PLATFORM)
	-rm -rf bin