diff options
Diffstat (limited to 'gnumake.h')
-rw-r--r-- | gnumake.h | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -26,13 +26,23 @@ typedef struct unsigned long lineno; } gmk_floc; +#ifdef _WIN32 +# ifdef MAIN +# define GMK_EXPORT __declspec(dllexport) +# else +# define GMK_EXPORT __declspec(dllimport) +# endif +#else +# define GMK_EXPORT +#endif + /* Run $(eval ...) on the provided string BUFFER. */ -void gmk_eval (const char *buffer, const gmk_floc *floc); +void GMK_EXPORT gmk_eval (const char *buffer, const gmk_floc *floc); /* Run GNU make expansion on the provided string STR. Returns an allocated buffer that the caller must free. */ -char *gmk_expand (const char *str); +char * GMK_EXPORT gmk_expand (const char *str); /* Register a new GNU make function NAME (maximum of 255 chars long). When the function is expanded in the makefile, FUNC will be invoked with @@ -49,8 +59,9 @@ char *gmk_expand (const char *str); If EXPAND_ARGS is 0, the arguments to the function will not be expanded before FUNC is called. If EXPAND_ARGS is non-0, they will be expanded. */ -void gmk_add_function (const char *name, - char *(*func)(const char *nm, int argc, char **argv), - int min_args, int max_args, int expand_args); +void GMK_EXPORT gmk_add_function (const char *name, + char *(*func)(const char *nm, + int argc, char **argv), + int min_args, int max_args, int expand_args); #endif /* _GNUMAKE_H_ */ |