|
@ -119,21 +119,27 @@ OBJS += external/stb_vorbis.o |
|
|
# compile raylib static library for desktop platforms.
|
|
|
# compile raylib static library for desktop platforms.
|
|
|
# The automatic variable "$@" is the target name, while "$<" is the first
|
|
|
# The automatic variable "$@" is the target name, while "$<" is the first
|
|
|
# prerequisite.
|
|
|
# prerequisite.
|
|
|
|
|
|
# WARNING: you must type "make clean" before doing this target if you have
|
|
|
|
|
|
# done "make libraylib.so".
|
|
|
libraylib.a : $(OBJS) |
|
|
libraylib.a : $(OBJS) |
|
|
ar rcs $@ $(OBJS) |
|
|
ar rcs $@ $(OBJS) |
|
|
@echo "libraylib.a generated (static library)!" |
|
|
@echo "libraylib.a generated (static library)!" |
|
|
|
|
|
|
|
|
# compile raylib to shared library version.
|
|
|
|
|
|
|
|
|
# compile raylib to shared library version for GNU/Linux.
|
|
|
|
|
|
# WARNING: you must type "make clean" before doing this target if you have
|
|
|
|
|
|
# done "make libraylib.so".
|
|
|
libraylib.so : $(OBJS) |
|
|
libraylib.so : $(OBJS) |
|
|
$(CC) -shared -o $@ $(OBJS) |
|
|
$(CC) -shared -o $@ $(OBJS) |
|
|
|
|
|
@echo "libraylib.so generated (shared library)!" |
|
|
|
|
|
|
|
|
# compile raylib for web.
|
|
|
# compile raylib for web.
|
|
|
|
|
|
# WARNING: you must type "make clean" before doing this target if you have
|
|
|
|
|
|
# done "make libraylib.a/.bc".
|
|
|
libraylib.bc : $(OBJS) |
|
|
libraylib.bc : $(OBJS) |
|
|
emcc -O1 $(OBJS) -o $@ |
|
|
emcc -O1 $(OBJS) -o $@ |
|
|
@echo "libraylib.bc generated (web version)!" |
|
|
@echo "libraylib.bc generated (web version)!" |
|
|
|
|
|
|
|
|
# compile all modules with relative prerequisites (header files of the
|
|
|
|
|
|
# project).
|
|
|
|
|
|
|
|
|
# It compile all modules with their prerequisite.
|
|
|
camera.o : camera.c raylib.h |
|
|
camera.o : camera.c raylib.h |
|
|
$(CC) -c $< $(CFLAGS) $(INCLUDES) |
|
|
$(CC) -c $< $(CFLAGS) $(INCLUDES) |
|
|
|
|
|
|
|
@ -168,8 +174,8 @@ audio.o : audio.c audio.h |
|
|
external/stb_vorbis.o: external/stb_vorbis.c external/stb_vorbis.h |
|
|
external/stb_vorbis.o: external/stb_vorbis.c external/stb_vorbis.h |
|
|
$(CC) -c -o $@ $< -O1 $(CFLAGS) $(INCLUDES) -D$(PLATFORM) |
|
|
$(CC) -c -o $@ $< -O1 $(CFLAGS) $(INCLUDES) -D$(PLATFORM) |
|
|
|
|
|
|
|
|
# It installs (copy) raylib dev files (static library and header) to standard
|
|
|
|
|
|
# directories on GNU/Linux platform.
|
|
|
|
|
|
|
|
|
# It installs generated and needed files to compile projects using raylib.
|
|
|
|
|
|
# The installation works manually.
|
|
|
# TODO: add other platforms.
|
|
|
# TODO: add other platforms.
|
|
|
install : |
|
|
install : |
|
|
ifeq ($(ROOT),root) |
|
|
ifeq ($(ROOT),root) |
|
@ -178,10 +184,10 @@ ifeq ($(ROOT),root) |
|
|
# libraries and header files. These directory (/usr/local/lib and |
|
|
# libraries and header files. These directory (/usr/local/lib and |
|
|
# /usr/local/include/) are for libraries that are installed |
|
|
# /usr/local/include/) are for libraries that are installed |
|
|
# manually (without a package manager). |
|
|
# manually (without a package manager). |
|
|
cp --update raylib.h /usr/local/include/raylib.h |
|
|
|
|
|
ifeq ($(SHARED),YES) |
|
|
ifeq ($(SHARED),YES) |
|
|
cp --update libraylib.so /usr/local/lib/libraylib.so |
|
|
cp --update libraylib.so /usr/local/lib/libraylib.so |
|
|
else |
|
|
else |
|
|
|
|
|
cp --update raylib.h /usr/local/include/raylib.h |
|
|
cp --update libraylib.a /usr/local/lib/libraylib.a |
|
|
cp --update libraylib.a /usr/local/lib/libraylib.a |
|
|
endif |
|
|
endif |
|
|
@echo "raylib dev files installed/updated!" |
|
|
@echo "raylib dev files installed/updated!" |
|
|