raylib/projects/Notepad++/npes_saved_tcc.txt

117 lines
6.8 KiB
Plaintext
Raw Normal View History

2018-06-01 12:36:31 +03:00
<EFBFBD><EFBFBD>::basic_c_compilation
echo > Setup required Environment
echo -------------------------------------
SET RAYLIB_DIR=C:\raylib
ENV_SET PATH=$(RAYLIB_DIR)\tcc
SET CC=tcc
SET RESC=windres
cd $(CURRENT_DIRECTORY)
echo
echo > Compile simple C file
echo ----------------------------
$(CC) -o $(NAME_PART).exe $(FILE_NAME) -Wall -Wextra -std=c99
$(RESC) -DIDC_STATIC=-1 -O coff raylib.rc -o raylib.rc.o
echo
echo > Reset Environment
echo --------------------------
ENV_UNSET PATH
::raylib_compile_execute
echo > Setup required Environment
echo -------------------------------------
SET RAYLIB_DIR=C:\raylib
ENV_SET PATH=$(RAYLIB_DIR)\tcc
SET CC=tcc
//SET CFLAGS=$(RAYLIB_DIR)\tcc\raylib.rc.o -std=c99 -Wall
SET CFLAGS=-std=c99 -Wall
SET LDFLAGS=-lmsvcrt -lraylib -lopengl32 -lgdi32 -lkernel32 -lshell32 -luser32 -Wl,-subsystem=gui
cd $(CURRENT_DIRECTORY)
echo
echo > Clean latest build
echo ------------------------
cmd /c IF EXIST $(NAME_PART).exe del /F $(NAME_PART).exe
echo
echo > Compile program
echo -----------------------
$(CC) -o $(NAME_PART).exe $(FILE_NAME) $(CFLAGS) $(LDFLAGS)
echo
echo > Reset Environment
echo --------------------------
ENV_UNSET PATH
echo
echo > Execute program
echo -----------------------
cmd /c IF EXIST $(NAME_PART).exe $(NAME_PART).exe
::raylib_source_compile
echo > Choose compile options
echo -------------------------------
echo Set desired OpenGL API version: 1.1, 2.1, 3.3
SET GRAPHIC_API=GRAPHICS_API_OPENGL_33
echo
echo > Setup required Environment
echo -------------------------------------
SET RAYLIB_DIR=C:\raylib
ENV_SET PATH=$(RAYLIB_DIR)\tcc
SET CC=tcc
SET AR=tcc -ar
SET CFLAGS=-std=c99 -Wall -DPLATFORM_DESKTOP -DSTBI_NO_SIMD -DMAL_NO_WASAPI -D$(GRAPHIC_API)
SET RELEASEPATH=$(RAYLIB_DIR)\tcc
//cd $(RAYLIB_DIR)\raylib\src
cd $(CURRENT_DIRECTORY)
echo
echo > Clean latest build
echo -----------------------
cmd /c del /F *.o
cmd /c del /F libraylib.a
echo
echo > Compile raylib modules
echo ------------------------------
$(CC) -c core.c -Iexternal/glfw/include $(CFLAGS)
$(CC) -c rglfw.c $(CFLAGS)
$(CC) -c rlgl.c $(CFLAGS)
$(CC) -c shapes.c $(CFLAGS)
$(CC) -c textures.c $(CFLAGS)
$(CC) -c text.c $(CFLAGS)
$(CC) -c models.c $(CFLAGS)
$(CC) -c audio.c $(CFLAGS)
$(CC) -c external/mini_al.c $(CFLAGS)
$(CC) -c external/stb_vorbis.c $(CFLAGS)
$(CC) -c utils.c $(CFLAGS)
echo
echo > Generate raylib library
echo ------------------------------
$(AR) rcs libraylib.a core.o rglfw.o rlgl.o shapes.o textures.o text.o models.o audio.o mini_al.o stb_vorbis.o utils.o
echo
echo > Install raylib library
echo --------------------------
cmd /c copy raylib.h ..\release\include\raylib.h /Y
cmd /c copy libraylib.a ..\release\libs\win32\tcc\libraylib.a /Y
cmd /c copy raylib.h $(RELEASEPATH)\include /Y
cmd /c copy libraylib.a $(RELEASEPATH)\lib /Y
echo
echo > Reset Environment
echo --------------------------
ENV_UNSET PATH
::raylib_makefile
echo > Choose compile options
echo -------------------------------
echo Set desired PLATFORM: DESKTOP, RPI, ANDROID, WEB
SET PLATFORM=PLATFORM_DESKTOP
echo
echo > Setup required Environment
echo -------------------------------------
SET RAYLIB_PATH=C:\raylib
ENV_SET PATH=$(RAYLIB_PATH)\tcc
SET MAKE=make
cd $(CURRENT_DIRECTORY)
echo
echo > Execute makefile
echo -----------------------
$(MAKE) PLATFORM=$(PLATFORM) -B
echo
echo > Reset Environment
echo --------------------------
ENV_UNSET PATH