Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Debugger] Windows port for geany's "debugger" plugin. #83

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Makefile.in
/build/cache
/build-aux/
/build-stamp
/debugger/localwin32.mk
/debugger/config.h
/geanygdb/src/ttyhelper
/codenames
/config.guess
Expand Down
59 changes: 59 additions & 0 deletions debugger/Makefile.win32
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# See http://www.geany.org/Support/BuildingOnWin32
# Running make creates config.h then calls the sub makefiles.
#
# Other targets are:
# clean: clean all generated files
# install: install to DESTDIR
#
# localwin32.mk is an optional file to override make variables.
# Use localwin32.mk instead of editing variables as it is included in sub
# makefiles.
# For MSYS set MSYS=1.
# By default this should work in a Windows command prompt (cmd.exe).

CC = gcc
CP = copy /y
RM = del
MKDIR = mkdir
# $/ is used as a portable directory separator
# strip is used to prevent line wrap
/ := $(strip \)
DESTDIR = C:/Program Files/Geany
-include localwin32.mk

ifndef GEANY
GEANY="$DESTDIR"
endif

export GEANY

ifdef GEANY_SRC
export GEANY_SRC
endif

ifdef MSYS
CP = cp
RM = rm -f
/ = /

export MSYS
endif

all: config.h
$(MAKE) -C src -f Makefile.win32

config.h: win32-config.h
$(CP) $< $@

clean:
$(MAKE) -C src -f Makefile.win32 clean

install:
ifdef GEANY
$(CP) src$/*.dll "$(GEANY)/lib"
endif

$(MAKE) -C img -f Makefile.win32


.PHONY: all clean install
25 changes: 25 additions & 0 deletions debugger/img/Makefile.win32
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
CP = copy /y
/ := $(strip \)

# $/ is used as a portable directory separator
# strip is used to prevent line wrap
/ := $(strip \)
DESTDIR = C:/Program Files/Geany
-include localwin32.mk

ifndef GEANY
GEANY="$DESTDIR"
endif

DBGPLUG_DATA_DIR="$(GEANY)/share/geany-plugins/debugger"

ifdef MSYS
CP = cp
RM = rm -f
/ = /
endif

all:
$(CP) *.png $(DBGPLUG_DATA_DIR)
$(CP) *.gif $(DBGPLUG_DATA_DIR)

142 changes: 142 additions & 0 deletions debugger/src/Makefile.win32
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
PLUGIN= debugger

CC = gcc
RM = del

#path to Gtk installed dir
GTK_PATH = C:/libs

-include ../localwin32.mk


DBGPLUG_DATA_DIR="\"$(GEANY)/share/geany-plugins/debugger\""
LOCALEDIR="\"$(GEANY)/share/locale/debugger\""

ifdef MSYS
RM = rm -f
endif

.SUFFIXES: .xpm .c .o .dll

GEANY_INCLUDES= -I$(GEANY_SRC)/plugins \
-I$(GEANY_SRC)/src \
-I$(GEANY_SRC)/scintilla/include \
-I$(GEANY_SRC)/tagmanager/src \

GTK_INCLUDES= \
-I$(GTK_PATH)/include/gtk-2.0 \
-I$(GTK_PATH)/lib/gtk-2.0/include \
-I$(GTK_PATH)/include/atk-1.0 \
-I$(GTK_PATH)/include/cairo \
-I$(GTK_PATH)/include/gdk-pixbuf-2.0 \
-I$(GTK_PATH)/include/pango-1.0 \
-I$(GTK_PATH)/include/glib-2.0 \
-I$(GTK_PATH)/lib/glib-2.0/include \
-I$(GTK_PATH)/include \
-I$(GTK_PATH)/include/gettext

INCLUDEDIRS= -I.. $(GEANY_INCLUDES) $(GTK_INCLUDES)

ALL_GTK_LIBS= \
-L"$(GTK_PATH)/lib" \
-lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 \
-lpango-1.0 -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lgthread-2.0 -lintl \
-lcairo -lpangocairo-1.0 -lgio-2.0


ifndef GTK210
ALL_GTK_LIBS += -liconv
endif

CBASEFLAGS=-Wall -pipe -mms-bitfields

ifdef DEBUG
CFLAGS=-O0 -g $(CBASEFLAGS)
else
CFLAGS=-O2 $(CBASEFLAGS)
endif

CFLAGS+= -DGTK \
-DPLUGIN_NAME="$(PLUGIN)" \
-DDBGPLUG_DATA_DIR=$(DBGPLUG_DATA_DIR) \
-DLOCALEDIR=$(LOCALEDIR) \
-DHAVE_CONFIG_H \
-mwindows


.PHONY: all clean plugin

XPMS= \
xpm/breakpoint_condition.xpm \
xpm/breakpoint_disabled.xpm \
xpm/breakpoint.xpm \
xpm/frame_current.xpm \
xpm/frame.xpm \
xpm/argument.xpm \
xpm/local.xpm \
xpm/watch.xpm


SRCS = \
bptree.c \
breakpoint.c \
breakpoints.c \
btnpanel.c \
callbacks.c \
calltip.c \
dbm_gdb.c \
dconfig.c \
debug.c \
debug_module.c \
dpaned.c \
envtree.c \
gui.c \
keys.c \
atree.c \
markers.c \
pixbuf.c \
plugin.c \
stree.c \
tabs.c \
tpage.c \
utils.c \
vtree.c \
watch_model.c \
wtree.c \
win32.c \
cell_renderers/cellrendererbreakicon.c \
cell_renderers/cellrendererframeicon.c \
cell_renderers/cellrenderertoggle.c


OBJS = $(SRCS:.c=.o)
OBJS += $(XPMS:.xpm=.o)

all: $(OBJS) plugin

.xpm.o:
$(CC) -x c $(CFLAGS) $(DEFINES) $(INCLUDEDIRS) -o $@ -c $<

.c.o:
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDEDIRS) -o $@ -c $<

plugin:
$(CC) -shared $(OBJS) $(ALL_GTK_LIBS) $(DLL_LD_FLAGS) -o $(PLUGIN).dll


clean:
-$(RM) deps.mak *.o *.dll

deps.mak:
$(CC) -MM $(CFLAGS) $(DEFINES) $(INCLUDEDIRS) *.c >deps.mak

# Generate header dependencies with "make deps.mak"
include deps.mak

..\localwin32.mk:
echo # Set local variables here >$@





Loading