diff options
| author | JuDelCo <judelco.dev@gmail.com> | 2019-11-16 04:46:20 +0100 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2019-11-15 19:46:20 -0800 |
| commit | 8b7db29ba0fbf27919cbdcfa8326fdb6307371c1 (patch) | |
| tree | 0bcf0c54fa4abe3b600d4145f3beb36536c0d571 | |
| parent | 74642ba1c634ca6e5b09a6c45855dcb9497feebb (diff) | |
| download | raylib-8b7db29ba0fbf27919cbdcfa8326fdb6307371c1.tar.gz raylib-8b7db29ba0fbf27919cbdcfa8326fdb6307371c1.zip | |
Fix Makefile missing X11 lib when building as a shared library on Linux. (#1018)
| -rw-r--r-- | src/Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Makefile b/src/Makefile index ac864680..e7db7d98 100644 --- a/src/Makefile +++ b/src/Makefile @@ -360,6 +360,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS), LINUX) ifeq ($(USE_WAYLAND_DISPLAY),TRUE) CFLAGS += -D_GLFW_WAYLAND + else + LDLIBS = -lX11 endif endif endif @@ -488,7 +490,7 @@ else ifeq ($(PLATFORM_OS),LINUX) # Compile raylib shared library version $(RAYLIB_VERSION). # WARNING: you should type "make clean" before doing this target - $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/libraylib.so.$(RAYLIB_VERSION) $(OBJS) -Wl,-soname,libraylib.so.$(RAYLIB_API_VERSION) -lGL -lc -lm -lpthread -ldl -lrt + $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/libraylib.so.$(RAYLIB_VERSION) $(OBJS) -Wl,-soname,libraylib.so.$(RAYLIB_API_VERSION) -lGL -lc -lm -lpthread -ldl -lrt $(LDLIBS) @echo "raylib shared library generated (libraylib.so.$(RAYLIB_VERSION)) in $(RAYLIB_RELEASE_PATH)!" cd $(RAYLIB_RELEASE_PATH) && ln -fsv libraylib.so.$(RAYLIB_VERSION) libraylib.so.$(RAYLIB_API_VERSION) cd $(RAYLIB_RELEASE_PATH) && ln -fsv libraylib.so.$(RAYLIB_API_VERSION) libraylib.so |
