forked from WearCode/magiskboot_build
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
24 lines (23 loc) · 896 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
all:
clean:
rm -rf build
ifneq ($(wildcard .git),)
rm -f include/flags.h
ifeq ($(OS),Windows_NT)
git submodule foreach --recursive git config core.symlinks true
endif # Windows_NT
git submodule update -f --recursive
git submodule foreach --recursive git clean -fd
# HACK: On Windows, symlinks have two different types: file and directory,
# if the target path doesn't exist when the symlink is created,
# Cygwin will fallback to create a non-native link, which makes the
# symlink unusable to pure Win32 apps (e.g. our compilers) later.
#
# Since the target path may not exist at the time of creation, we can fix
# this by deleting all the symlinks after the first checkout and
# letting Git to re-create them for us.
ifeq ($(OS),Windows_NT)
find -type l -exec rm -f {} +
git submodule update -f --recursive
endif # Windows_NT
endif # wildcard .git