aboutsummaryrefslogtreecommitdiff
path: root/tools/depends/target/libzip/Makefile
blob: 5034951740465abd022c3a5f4f980a43a0377a00 (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
include ../../Makefile.include LIBZIP-VERSION ../../download-files.include
DEPS = ../../Makefile.include LIBZIP-VERSION Makefile ../../download-files.include

CMAKE_OPTIONS=-DBUILD_DOC:BOOL=OFF \
              -DBUILD_EXAMPLES:BOOL=OFF \
              -DBUILD_REGRESS:BOOL=OFF \
              -DBUILD_SHARED_LIBS:BOOL=OFF \
              -DBUILD_TOOLS:BOOL=OFF \
              -DCMAKE_BUILD_TYPE=Debug

LIBDYLIB=$(PLATFORM)/build/lib/$(BYPRODUCT)

all: .installed-$(PLATFORM)

$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) $(DEPS)
	rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
	cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
	cd $(PLATFORM); $(CMAKE) -B build ${CMAKE_OPTIONS}

$(LIBDYLIB): $(PLATFORM)
	$(MAKE) -C $(PLATFORM)/build

.installed-$(PLATFORM): $(LIBDYLIB)
	$(MAKE) -C $(PLATFORM)/build install
	touch $@

clean:
	$(MAKE) -C $(PLATFORM) clean
	rm -f .installed-$(PLATFORM)

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