From d38fb9bda278134c749c4ccbd736edf028dd131c Mon Sep 17 00:00:00 2001 From: LelixSuper Date: Sat, 16 Jul 2016 21:23:21 +0200 Subject: [PATCH] fix small things on makefile of 'src/' folder --- src/Makefile | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Makefile b/src/Makefile index 39f3c8a3d..034bb6a03 100644 --- a/src/Makefile +++ b/src/Makefile @@ -69,11 +69,9 @@ endif # define compiler: gcc for C program, define as g++ for C++ ifeq ($(PLATFORM),PLATFORM_WEB) - # define emscripten compiler - CC = emcc + CC = emcc # emscripten compiler else - # define default gcc compiler - CC = gcc + CC = gcc # default gcc compiler endif # define compiler flags: @@ -106,16 +104,16 @@ OBJS = $(patsubst %.c, %.o, $(wildcard *.c)) # typing 'make', it will invoke the first target on the file. # The target 'all' compile raylib into static, web and dynamic library. -# TODO: add possibility to compile web and dynamic version of raylib. -all: libraylib.a +# TODO: add possibility to compile dynamic version of raylib. +all: libraylib.a libraylib.bc # compile raylib static library for desktop platforms libraylib.a : $(OBJS) - ar rcs libraylib.a $(OBJS) + ar rcs $@ $(OBJS) @echo "libraylib.a generated (static library)!" libraylib.bc : $(OBJS) - emcc -O1 $(OBJS) -o libraylib.bc + emcc -O1 $(OBJS) -o $@ @echo "libraylib.bc generated (web version)!" # compile all modules @@ -123,7 +121,7 @@ libraylib.bc : $(OBJS) ifneq ($(PLATFORM),PLATTFORM_WEB) $(CC) -c -o $@ $< $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS) else - emcc $< -o $@ -DPLATFORM_DEKSTOP + emcc -c -o $@ $< $(CFLAGS) $(INCLUDES) -D$(GRAPHICS) -DPLATFORM_DEKSTOP endif # compile stb_vorbis library