Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed an issue in Makefile when using raygui and physac on unix systems #2384

Merged
merged 2 commits into from
Mar 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
raysan5 marked this conversation as resolved.
Show resolved Hide resolved
@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)
Expand Down