Add raylib #3
1 changed files with 13 additions and 2 deletions
15
Makefile
15
Makefile
|
|
@ -86,8 +86,18 @@ endif
|
||||||
# BSD (ELF, dlopen lives in libc)
|
# BSD (ELF, dlopen lives in libc)
|
||||||
ifeq ($(OS_KIND),bsd)
|
ifeq ($(OS_KIND),bsd)
|
||||||
EXPORT_LDFLAGS := -Wl,-E
|
EXPORT_LDFLAGS := -Wl,-E
|
||||||
# raylib's own BSD list lacks the X11 set its examples link.
|
# ld searches /usr/lib only. pkg(8) installs into /usr/local (FreeBSD,
|
||||||
PLAT_LIBS := -lm -lGL -lpthread -lX11 -lXrandr -lXinerama -lXi -lXcursor
|
# DragonFly), pkgsrc into /usr/pkg (NetBSD), and base X11 lives in
|
||||||
|
# /usr/X11R6 (OpenBSD) or /usr/X11R7 (NetBSD), so every -l below needs an
|
||||||
|
# explicit -L. raylib's own BSD link list omits the X11 set and these paths,
|
||||||
|
# which is why its examples only link on a system with the libs on the
|
||||||
|
# default search path.
|
||||||
|
BSD_LIBDIRS := -L/usr/local/lib
|
||||||
|
ifneq (,$(filter OpenBSD NetBSD,$(PLATFORM)))
|
||||||
|
BSD_LIBDIRS += -L/usr/pkg/lib -L/usr/X11R6/lib -L/usr/X11R7/lib
|
||||||
|
endif
|
||||||
|
PLAT_LIBS := $(BSD_LIBDIRS) -lm -lGL -lpthread \
|
||||||
|
-lX11 -lXrandr -lXinerama -lXi -lXcursor
|
||||||
ifneq (,$(filter $(PLATFORM),OpenBSD NetBSD))
|
ifneq (,$(filter $(PLATFORM),OpenBSD NetBSD))
|
||||||
PLAT_LIBS += -lossaudio
|
PLAT_LIBS += -lossaudio
|
||||||
endif
|
endif
|
||||||
|
|
@ -332,6 +342,7 @@ print-config:
|
||||||
@echo "CPPFLAGS = $(CPPFLAGS)"
|
@echo "CPPFLAGS = $(CPPFLAGS)"
|
||||||
@echo "EXPORT_LDFLAGS = $(EXPORT_LDFLAGS)"
|
@echo "EXPORT_LDFLAGS = $(EXPORT_LDFLAGS)"
|
||||||
@echo "PLAT_LIBS = $(PLAT_LIBS)"
|
@echo "PLAT_LIBS = $(PLAT_LIBS)"
|
||||||
|
@echo "BSD_LIBDIRS = $(BSD_LIBDIRS)"
|
||||||
@echo "LINK_TARGET = $(LINK_TARGET)"
|
@echo "LINK_TARGET = $(LINK_TARGET)"
|
||||||
@echo "OBJ = $(OBJ)"
|
@echo "OBJ = $(OBJ)"
|
||||||
@echo "HOST_CC = $(HOST_CC)"
|
@echo "HOST_CC = $(HOST_CC)"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue