update: the way we store libs

This commit is contained in:
2025-07-18 20:23:30 -04:00
parent 1e08c7e33b
commit bd25ddaa52

View File

@@ -11,12 +11,19 @@ typedef enum {
UNLICENCE, /* Unlicense */
} licence_t;
/* Library type enumeration */
/* Library type enumeration - using bit flags for multiple selection */
typedef enum {
RAYLIB, /* Raylib game library */
WINAPI, /* Windows API */
cURL, /* cURL library */
} lib_t;
LIB_NONE = 0, /* No libraries selected */
LIB_RAYLIB = 1 << 0, /* Raylib game library */
LIB_WINAPI = 1 << 1, /* Windows API */
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 */
typedef struct {
@@ -25,11 +32,19 @@ typedef struct {
licence_t licence; /* License type for the project */
char *project; /* Project name */
char *name; /* Author/creator name */
lib_flags_t libraries; /* Selected libraries (bit field) */
} format_t;
/* Default values */
#define DEFAULT_LICENSE BSD3
#define DEFAULT_GIT_INIT 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