Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

cbMakefileGen plugin

(1/29) > >>

kisoft:
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: kisoft@rambler.ru

# 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]

mandrav:
I haven't looked at this yet but thanks kisoft. I guess some people will be very happy with this ;).

(I was planning for something like this (for later though) but I would write a script, not a binary plugin.)

kisoft:

--- Quote from: mandrav on June 22, 2007, 11:02:39 am ---I haven't looked at this yet but thanks kisoft. I guess some people will be very happy with this ;).

(I was planning for something like this (for later though) but I would write a script, not a binary plugin.)

--- End quote ---
Some about script. When plugin is claim then it would do progress. Then this work (discussion) can help later for a script realization.
There is time for everything.
Good luck!

patlecat:
hi kisoft

I think such a plugin is really wanted here. I would love to use it. But you didnt provide an executable and I can't compile your project  :(
But I really need a written Makefile!!

Please help us...

kisoft:

--- Quote from: patlecat on July 11, 2007, 01:50:57 pm ---I think such a plugin is really wanted here. I would love to use it. But you didnt provide an executable and I can't compile your project  :(

--- End quote ---
I can create cbMakefileGen.plugin for Win (WinXP SP2 for me, see attached file), but I don't know how create this plugin for *nix (I have installed Ubuntu 6.10 now, but I being compiled this plugin with contrib plugins).


[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

Go to full version