diff options
| author | tixvage <[email protected]> | 2022-03-12 23:30:54 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-03-12 21:30:54 +0100 |
| commit | 3f01b8a93fd42757647f16d8a09aa72faad76521 (patch) | |
| tree | bca2f0a00518156e91db5213d7f5b8555f743f7f /src | |
| parent | a5a098c97fe1410c41a698e86975c941787591fa (diff) | |
| download | raylib-3f01b8a93fd42757647f16d8a09aa72faad76521.tar.gz raylib-3f01b8a93fd42757647f16d8a09aa72faad76521.zip | |
Fixed an issue in Makefile when using raygui and physac on unix systems (#2384)
* Fixed an issue when using raygui and physac on unix systems
hash "#" is single-line comment character in bash so echo ignores #include and #define
* tab fix
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile index 87d76a65..b094099f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -663,17 +663,26 @@ raudio.o : raudio.c raylib.h raygui.o : raygui.c $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) raygui.c: - echo #define RAYGUI_IMPLEMENTATION > raygui.c - echo #include "$(RAYLIB_MODULE_RAYGUI_PATH)/raygui.h" >> raygui.c +ifeq ($(PLATFORM_SHELL), cmd) + @echo #define RAYGUI_IMPLEMENTATION > raygui.c + @echo #include "$(RAYLIB_MODULE_RAYGUI_PATH)/raygui.h" >> raygui.c +else + @echo "#define RAYGUI_IMPLEMENTATION" > raygui.c + @echo "#include \"$(RAYLIB_MODULE_RAYGUI_PATH)/raygui.h\"" >> raygui.c +endif # Compile physac module # NOTE: physac header should be distributed with raylib.h physac.o : physac.c $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) physac.c: +ifeq ($(PLATFORM_SHELL), cmd) @echo #define PHYSAC_IMPLEMENTATION > physac.c @echo #include "$(RAYLIB_MODULE_PHYSAC_PATH)/physac.h" >> physac.c - +else + @echo "#define PHYSAC_IMPLEMENTATION" > physac.c + @echo "#include \"$(RAYLIB_MODULE_PHYSAC_PATH)/physac.h\"" >> physac.c +endif # Compile android_native_app_glue module android_native_app_glue.o : $(NATIVE_APP_GLUE)/android_native_app_glue.c $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) |
