fix small things on makefile of 'src/' folder

This commit is contained in:
LelixSuper
2016-07-16 21:23:21 +02:00
parent 6efaa78058
commit d38fb9bda2

View File

@@ -69,11 +69,9 @@ endif
# define compiler: gcc for C program, define as g++ for C++ # define compiler: gcc for C program, define as g++ for C++
ifeq ($(PLATFORM),PLATFORM_WEB) ifeq ($(PLATFORM),PLATFORM_WEB)
# define emscripten compiler CC = emcc # emscripten compiler
CC = emcc
else else
# define default gcc compiler CC = gcc # default gcc compiler
CC = gcc
endif endif
# define compiler flags: # define compiler flags:
@@ -106,16 +104,16 @@ OBJS = $(patsubst %.c, %.o, $(wildcard *.c))
# typing 'make', it will invoke the first target on the file. # typing 'make', it will invoke the first target on the file.
# The target 'all' compile raylib into static, web and dynamic library. # The target 'all' compile raylib into static, web and dynamic library.
# TODO: add possibility to compile web and dynamic version of raylib. # TODO: add possibility to compile dynamic version of raylib.
all: libraylib.a all: libraylib.a libraylib.bc
# compile raylib static library for desktop platforms # compile raylib static library for desktop platforms
libraylib.a : $(OBJS) libraylib.a : $(OBJS)
ar rcs libraylib.a $(OBJS) ar rcs $@ $(OBJS)
@echo "libraylib.a generated (static library)!" @echo "libraylib.a generated (static library)!"
libraylib.bc : $(OBJS) libraylib.bc : $(OBJS)
emcc -O1 $(OBJS) -o libraylib.bc emcc -O1 $(OBJS) -o $@
@echo "libraylib.bc generated (web version)!" @echo "libraylib.bc generated (web version)!"
# compile all modules # compile all modules
@@ -123,7 +121,7 @@ libraylib.bc : $(OBJS)
ifneq ($(PLATFORM),PLATTFORM_WEB) ifneq ($(PLATFORM),PLATTFORM_WEB)
$(CC) -c -o $@ $< $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS) $(CC) -c -o $@ $< $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS)
else else
emcc $< -o $@ -DPLATFORM_DEKSTOP emcc -c -o $@ $< $(CFLAGS) $(INCLUDES) -D$(GRAPHICS) -DPLATFORM_DEKSTOP
endif endif
# compile stb_vorbis library # compile stb_vorbis library