Kirix Support Forums

Building on Linux

Please post any wxWebConnect patches or modifications you've created here. Thanks!

Building on Linux

Postby ngpaton on Wed Aug 19, 2009 4:53 am

Hi,

The download for linux is incomplete as it is missing the top.mak file. So to get it building I modified the make files as follows (comment headers omitted to save space):

webconnect/testapp/Makefile
Code: Select all
include ../common.mak

EXENAME = testapp
INCLUDES =
CXXFLAGS = $(COM_CXXFLAGS) $(WX_CXXFLAGS)
LIBS = -L../webconnect -lwebconnect $(WX_LDFLAGS)
DEPENDLIBS = ../webconnect/libwebconnect.a

OBJECTS = testapp.o

all: $(EXENAME)

$(EXENAME): $(OBJECTS) $(DEPENDLIBS)
      $(CXX) $(OBJECTS) $(LIBDIRS) $(LIBS) -o $(EXENAME)

clean:
   rm -f *.o *.gch $(EXENAME)

$(OBJECTS): %.o : %.cpp
   $(CXX) $(CXXFLAGS) $(INCLUDES) -c $<


webconnect/webconnect/Makefile
Code: Select all
include ../common.mak

INCLUDES =
DEFINES =
CXXFLAGS = $(COM_CXXFLAGS) $(WX_CXXFLAGS) -fno-rtti

OBJECTS = \
   dom.o \
   nsimpl.o \
   promptservice.o \
   webcontrol.o \
   webframe.o \
   webprefs.o

all: libwebconnect.a

libwebconnect.a: $(OBJECTS)
   ar rc libwebconnect.a $(OBJECTS)
   ranlib libwebconnect.a

clean:
   rm -f *.o libwebconnect.a

$(OBJECTS): %.o : %.cpp
   @echo $<
   $(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $<


webconnect/common.mak
Code: Select all
WX_UNICODE   = no

ifeq ($(BUILD), release)
COM_CXXFLAGS = -O2
WX_CXXFLAGS  = `wx-config --toolkit=gtk2 --unicode=$(WX_UNICODE) --static=no --debug=no --cxxflags`
WX_LDFLAGS   = `wx-config --toolkit=gtk2 --unicode=$(WX_UNICODE) --static=no --debug=no --libs`
else
COM_CXXFLAGS = -g -ggdb -O0
WX_CXXFLAGS  = `wx-config --toolkit=gtk2 --unicode=$(WX_UNICODE) --static=no --debug=yes --cxxflags`
WX_LDFLAGS   = `wx-config --toolkit=gtk2 --unicode=$(WX_UNICODE) --static=no --debug=yes --libs`
endif


Cheers

Nigel
ngpaton
Registered User
 
Posts: 11
Joined: Wed Aug 19, 2009 4:42 am

Return to wxWebConnect Patches & Modifications