Refactor build flags

This commit is contained in:
topjohnwu
2019-02-12 05:17:02 -05:00
parent b3fd79cbb9
commit ed027ec3ee
12 changed files with 27 additions and 24 deletions

View File

@ -1,15 +1,20 @@
#pragma once
/* Include this header anywhere you access MAGISK_DEBUG, MAGISK_VERSION, MAGISK_VER_CODE.
/* Include this header anywhere accessing MAGISK_DEBUG, MAGISK_VERSION, MAGISK_VER_CODE.
*
* This file is only for more precise incremental builds. We can make sure code that uses
* This file is for precise incremental builds. We can make sure code that uses
* external flags are re-compiled by updating the timestamp of this file
* */
#ifndef MAGISK_VERSION
#define MAGISK_VERSION 99.99
#endif
#define quote(s) #s
#define str(s) quote(s)
#ifndef MAGISK_VER_CODE
#define MAGISK_VER_CODE 99999
#define MAGISK_VERSION str(__MVSTR)
#define MAGISK_VER_CODE __MCODE
#define SHOW_VER(name) str(name) " v" MAGISK_VERSION "(" str(MAGISK_VER_CODE) ")"
#define FULL_VER(name) SHOW_VER(name) " (by topjohnwu)"
#ifdef __MDBG
#define MAGISK_DEBUG
#endif