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
This commit is contained in:
parent
a5a098c97f
commit
3f01b8a93f
1 changed files with 12 additions and 3 deletions
15
src/Makefile
15
src/Makefile
|
@ -663,17 +663,26 @@ raudio.o : raudio.c raylib.h
|
||||||
raygui.o : raygui.c
|
raygui.o : raygui.c
|
||||||
$(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
|
$(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
|
||||||
raygui.c:
|
raygui.c:
|
||||||
echo #define RAYGUI_IMPLEMENTATION > raygui.c
|
ifeq ($(PLATFORM_SHELL), cmd)
|
||||||
echo #include "$(RAYLIB_MODULE_RAYGUI_PATH)/raygui.h" >> raygui.c
|
@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
|
# Compile physac module
|
||||||
# NOTE: physac header should be distributed with raylib.h
|
# NOTE: physac header should be distributed with raylib.h
|
||||||
physac.o : physac.c
|
physac.o : physac.c
|
||||||
$(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
|
$(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
|
||||||
physac.c:
|
physac.c:
|
||||||
|
ifeq ($(PLATFORM_SHELL), cmd)
|
||||||
@echo #define PHYSAC_IMPLEMENTATION > physac.c
|
@echo #define PHYSAC_IMPLEMENTATION > physac.c
|
||||||
@echo #include "$(RAYLIB_MODULE_PHYSAC_PATH)/physac.h" >> 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
|
# Compile android_native_app_glue module
|
||||||
android_native_app_glue.o : $(NATIVE_APP_GLUE)/android_native_app_glue.c
|
android_native_app_glue.o : $(NATIVE_APP_GLUE)/android_native_app_glue.c
|
||||||
$(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
|
$(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue