diff --git a/.gitignore b/.gitignore index 8f76e40..d30193b 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ compile_commands.json /bin/ /build/ +/build-headless/ /deps/surge-build/ /documentation.pdf /jucewrapper/build/ diff --git a/include/OpenGL/gl.h b/include/OpenGL/gl.h new file mode 100644 index 0000000..da651ae --- /dev/null +++ b/include/OpenGL/gl.h @@ -0,0 +1,39 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * For a full copy of the GNU General Public License see the LICENSE file. + */ + +#pragma once + +#ifdef HEADLESS +# define GL_COLOR_BUFFER_BIT 0 +# define GL_DEPTH_BUFFER_BIT 0 +# define GL_STENCIL_BUFFER_BIT 0 +# define GL_PROJECTION 0 +# define GL_TRIANGLES 0 +static inline void glBegin(int) {} +static inline void glEnd() {} +static inline void glColor3f(float, float, float) {} +static inline void glVertex3f(float, float, float) {} +static inline void glClear(int) {} +static inline void glClearColor(double, double, double, double) {} +static inline void glLoadIdentity() {} +static inline void glMatrixMode(int) {} +static inline void glOrtho(double, double, double, double, double, double) {} +static inline void glViewport(double, double, double, double) {} +typedef unsigned int GLuint; +#else +# include_next +#endif diff --git a/src/Makefile b/src/Makefile index 2654df4..35270db 100644 --- a/src/Makefile +++ b/src/Makefile @@ -282,7 +282,7 @@ clap: $(TARGETS) $(MAKE) clap -C CardinalSynth $(CARDINAL_SYNTH_ARGS) clean: - rm -f $(TARGETS) + rm -f *.a rm -rf $(BUILD_DIR) $(MAKE) clean -C Cardinal $(MAKE) clean -C CardinalFX $(CARDINAL_FX_ARGS)