My ultimate compiler script, compiles current
.sp,
.c,
.cpp or
.py file.
PHP Code:
set SourcePawn_compiler = D:/Dropbox/SourcePawn/spcomp.exe
set SourcePawn_output = D:/Dropbox/SourcePawn/compiled
set C_compiler = $(NPP_DIRECTORY)/bin/gcc.exe
set Cpp_compiler = $(NPP_DIRECTORY)/bin/cpp.exe
set Python_interpreter = D:/Python/python.exe
if "$(EXT_PART)" == ".sp" goto @SourcePawn
if "$(EXT_PART)" == ".cpp" goto @C++
if "$(EXT_PART)" == ".c" goto @C
if "$(EXT_PART)" == ".py" goto @Python
echo !!! File extension not found !!!
goto @end
:@SourcePawn
NPP_SAVE
$(SourcePawn_compiler) "$(FULL_CURRENT_PATH)" -o"$(SourcePawn_output)/$(NAME_PART).smx"
// place to copy compiled plugin somewhere else
goto @end
:@C
NPP_SAVE
$(C_compiler) "$(FULL_CURRENT_PATH)" -o"$(CURRENT_DIRECTORY)/$(NAME_PART).exe" -pedantic -Wall -Werror -std=c99
$(CURRENT_DIRECTORY)/$(NAME_PART).exe
goto @end
:@C++
NPP_SAVE
$(Cpp_compiler) "$(FULL_CURRENT_PATH)" -o"$(CURRENT_DIRECTORY)/$(NAME_PART).exe"
$(CURRENT_DIRECTORY)/$(NAME_PART).exe
goto @end
:@Python
NPP_SAVE
$(Python_interpreter) "$(FULL_CURRENT_PATH)"
goto @end
:@end