mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
- Single unified routine for erroring out or handling missing dependencies - Single three-state enum instead of two Booleans for missing dependencies (this causes `-MC` to imply `-MG` instead of needing `-MG -MC`) - Functions than can miss included files return a Boolean for whether the parser should `YYACCEPT` and exit
31 lines
732 B
C++
31 lines
732 B
C++
// SPDX-License-Identifier: MIT
|
|
|
|
#ifndef RGBDS_ASM_MAIN_HPP
|
|
#define RGBDS_ASM_MAIN_HPP
|
|
|
|
#include <stdio.h>
|
|
#include <string>
|
|
|
|
extern bool verbose;
|
|
|
|
#define verbosePrint(...) \
|
|
do { \
|
|
if (verbose) { \
|
|
fprintf(stderr, __VA_ARGS__); \
|
|
} \
|
|
} while (0)
|
|
|
|
enum MissingInclude {
|
|
INC_ERROR, // A missing included file is an error that halts assembly
|
|
GEN_EXIT, // A missing included file is assumed to be generated; exit normally
|
|
GEN_CONTINUE, // A missing included file is assumed to be generated; continue assembling
|
|
};
|
|
|
|
extern FILE *dependFile;
|
|
extern std::string targetFileName;
|
|
extern MissingInclude missingIncludeState;
|
|
extern bool generatePhonyDeps;
|
|
extern bool failedOnMissingInclude;
|
|
|
|
#endif // RGBDS_ASM_MAIN_HPP
|