update: the way we store libs
This commit is contained in:
@@ -11,12 +11,19 @@ typedef enum {
|
|||||||
UNLICENCE, /* Unlicense */
|
UNLICENCE, /* Unlicense */
|
||||||
} licence_t;
|
} licence_t;
|
||||||
|
|
||||||
/* Library type enumeration */
|
/* Library type enumeration - using bit flags for multiple selection */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
RAYLIB, /* Raylib game library */
|
LIB_NONE = 0, /* No libraries selected */
|
||||||
WINAPI, /* Windows API */
|
LIB_RAYLIB = 1 << 0, /* Raylib game library */
|
||||||
cURL, /* cURL library */
|
LIB_WINAPI = 1 << 1, /* Windows API */
|
||||||
} lib_t;
|
LIB_CURL = 1 << 2, /* cURL library */
|
||||||
|
/* Future libraries can be added here:
|
||||||
|
* LIB_OPENGL = 1 << 3,
|
||||||
|
* LIB_SDL2 = 1 << 4,
|
||||||
|
* LIB_GTK = 1 << 5,
|
||||||
|
* etc.
|
||||||
|
*/
|
||||||
|
} lib_flags_t;
|
||||||
|
|
||||||
/* Project configuration structure */
|
/* Project configuration structure */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -25,11 +32,19 @@ typedef struct {
|
|||||||
licence_t licence; /* License type for the project */
|
licence_t licence; /* License type for the project */
|
||||||
char *project; /* Project name */
|
char *project; /* Project name */
|
||||||
char *name; /* Author/creator name */
|
char *name; /* Author/creator name */
|
||||||
|
lib_flags_t libraries; /* Selected libraries (bit field) */
|
||||||
} format_t;
|
} format_t;
|
||||||
|
|
||||||
/* Default values */
|
/* Default values */
|
||||||
#define DEFAULT_LICENSE BSD3
|
#define DEFAULT_LICENSE BSD3
|
||||||
#define DEFAULT_GIT_INIT true
|
#define DEFAULT_GIT_INIT true
|
||||||
#define DEFAULT_CLANG_FORMAT true
|
#define DEFAULT_CLANG_FORMAT true
|
||||||
|
#define DEFAULT_LIBRARIES LIB_NONE
|
||||||
|
|
||||||
|
/* Helper macros for library operations */
|
||||||
|
#define HAS_LIBRARY(libs, lib) ((libs) & (lib))
|
||||||
|
#define ADD_LIBRARY(libs, lib) ((libs) |= (lib))
|
||||||
|
#define REMOVE_LIBRARY(libs, lib) ((libs) &= ~(lib))
|
||||||
|
#define CLEAR_LIBRARIES(libs) ((libs) = LIB_NONE)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user