cbMakefileGen plugin - is a very simple makefile generator.
Features:
- Generate a simple makefile for current project and an active target
- Configuration options:
- Filename of Makefile
- Overwrite if exists (checkbox) (Use it with care!)
- Add '@' prefix for commands (checkbox)
ToDo list:
- Add dependents for each source
- Add dependents for project
- Add all targets to Makefile
Sources and Makefile.am, cbmakegen.cbp, cbmakegen-unix.cbp, manifest.xml included.
I build this plugin in $(#cb)/plugins/contrib/cbmakegen directory.
I build and check this plugin for WinXP SP2 and Ubuntu 6.10 only.
cbMakefileGen plugin - is my first plugin for CodeBlocks then you must being used a generated Makefile with care.
When this plugin is new then may content a few bugs.
If you need this plugin and can test it, a lot thanks for you bug reports and suggestions.
Generated file example:
# A simple makefile generator by KiSoft, 2007. mailto: [email protected]
# Project Variables start
CPP=mingw32-g++.exe
CC=mingw32-gcc.exe
LD=mingw32-g++.exe
LIB=ar.exe
WINDRES=windres.exe
OBJS=..\..\..\.objs\plugins\contrib\cbmakegen\Rule.o ..\..\..\.objs\plugins\contrib\cbmakegen\Makefile.o ..\..\..\.objs\plugins\contrib\cbmakegen\cbMakefileGen.o ..\..\..\.objs\plugins\contrib\cbmakegen\cbmakefilecfg.o ..\..\..\.objs\plugins\contrib\cbmakegen\Variable.o
# Project Variables end
all: ..\..\..\devel\share\CodeBlocks\plugins\cbMakefileGen.dll commandsafterbuild
.PHONY: commandsafterbuild
commandsafterbuild:
@zip -j9 ..\..\..\devel\share\CodeBlocks\cbMakefileGen.zip manifest.xml
..\..\..\devel\share\CodeBlocks\plugins\cbMakefileGen.dll: $(OBJS)
@echo Building dynamic library ..\..\..\devel\share\CodeBlocks\plugins\cbMakefileGen.dll
@mingw32-g++.exe -shared -Wl,--dll -LC:\Devel\codeblocks\src\devel -LC:\Devel\wxWidgets-2.8.4\lib\gcc_dll -LC:\MinGW\lib $(OBJS) -o ..\..\..\devel\share\CodeBlocks\plugins\cbMakefileGen.dll -s -lcodeblocks -lwxmsw28u
..\..\..\.objs\plugins\contrib\cbmakegen\Rule.o: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Rule.cpp
@echo Compiling: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Rule.cpp
@mingw32-g++.exe -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DTIXML_USE_STL -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DcbDEBUG -IC:\Devel\codeblocks\src\include -IC:\Devel\codeblocks\src\include\wxscintilla\include -IC:\Devel\wxWidgets-2.8.4\include -IC:\Devel\wxWidgets-2.8.4\lib\gcc_dll\mswu -IC:\MinGW\include -c C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Rule.cpp -o ..\..\..\.objs\plugins\contrib\cbmakegen\Rule.o
..\..\..\.objs\plugins\contrib\cbmakegen\Makefile.o: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Makefile.cpp
@echo Compiling: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Makefile.cpp
@mingw32-g++.exe -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DTIXML_USE_STL -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DcbDEBUG -IC:\Devel\codeblocks\src\include -IC:\Devel\codeblocks\src\include\wxscintilla\include -IC:\Devel\wxWidgets-2.8.4\include -IC:\Devel\wxWidgets-2.8.4\lib\gcc_dll\mswu -IC:\MinGW\include -c C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Makefile.cpp -o ..\..\..\.objs\plugins\contrib\cbmakegen\Makefile.o
..\..\..\.objs\plugins\contrib\cbmakegen\cbMakefileGen.o: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\cbMakefileGen.cpp
@echo Compiling: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\cbMakefileGen.cpp
@mingw32-g++.exe -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DTIXML_USE_STL -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DcbDEBUG -IC:\Devel\codeblocks\src\include -IC:\Devel\codeblocks\src\include\wxscintilla\include -IC:\Devel\wxWidgets-2.8.4\include -IC:\Devel\wxWidgets-2.8.4\lib\gcc_dll\mswu -IC:\MinGW\include -c C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\cbMakefileGen.cpp -o ..\..\..\.objs\plugins\contrib\cbmakegen\cbMakefileGen.o
..\..\..\.objs\plugins\contrib\cbmakegen\cbmakefilecfg.o: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\cbmakefilecfg.cpp
@echo Compiling: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\cbmakefilecfg.cpp
@mingw32-g++.exe -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DTIXML_USE_STL -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DcbDEBUG -IC:\Devel\codeblocks\src\include -IC:\Devel\codeblocks\src\include\wxscintilla\include -IC:\Devel\wxWidgets-2.8.4\include -IC:\Devel\wxWidgets-2.8.4\lib\gcc_dll\mswu -IC:\MinGW\include -c C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\cbmakefilecfg.cpp -o ..\..\..\.objs\plugins\contrib\cbmakegen\cbmakefilecfg.o
..\..\..\.objs\plugins\contrib\cbmakegen\Variable.o: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Variable.cpp
@echo Compiling: C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Variable.cpp
@mingw32-g++.exe -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DTIXML_USE_STL -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DcbDEBUG -IC:\Devel\codeblocks\src\include -IC:\Devel\codeblocks\src\include\wxscintilla\include -IC:\Devel\wxWidgets-2.8.4\include -IC:\Devel\wxWidgets-2.8.4\lib\gcc_dll\mswu -IC:\MinGW\include -c C:\Devel\codeblocks\src\plugins\contrib\cbmakegen\Variable.cpp -o ..\..\..\.objs\plugins\contrib\cbmakegen\Variable.o
.PHONY: clean
clean:
@echo Delete $(OBJS) ..\..\..\devel\share\CodeBlocks\plugins\cbMakefileGen.dll
@del /f $(OBJS) ..\..\..\devel\share\CodeBlocks\plugins\cbMakefileGen.dll
Good luck for All!
[attachment deleted by admin]