> Hi Dom!
> 
> Could You please make some hints on how to write a Makefile
> if I want to build a plugin?
> 
> Thanx
> 
> PT

Hi Peter,

Well, I'll only do the unix case. Michael Pritchett can help you with the 
win32 case.

CXX=c++
CFLAGS=-O2 -Wall
CCINCLUDES=-I/path/to/abiwords/header/files
COMPILE=$(CXX) $(CFLAGS) $(CCINCLUDES)

# can be -G for some c++ compilers, such as egcs
SHARED=-shared

SRCS=MyPluginFile1.cpp MyPluginFile2.cpp
OBJS=${SRCS:%.cpp=%.o}
RM=rm -f

PLUGIN=libMyPlugin.so

all: $(PLUGIN)

$(PLUGIN): $(OBJS)
        $(CXX) $(SHARED) -o $(PLUGIN) $(OBJS)

%.o : %.cpp
        $(COMPILE) -c -o $@ $<

clean:
        $(RM) $(OBJS) $(PLUGIN)


Dom

Reply via email to