# Makefile.
# $Id: Makefile.gcc.mak,v 1.1 2006/12/30 12:27:10 sirakaba Exp $

# Define i/o files.
OBJS     = spiLibrary-wx.o
IN_DEF   = ../../common/header/plugin.def
OUT_LIB  = ../../../bin/lib/spiLibrary-wx.so

# Define compilers.
CC = g++
CPPFLAGS = -c -O3 -Wall -W -fPIC `wx-config --cppflags`
LDFLAGS  = -shared -Wl,-Bsymbolic -s `wx-config --libs`
# -lwinecaller

.PHONY: all clean
.SUFFIXES: .cpp .o

all: $(OBJS)
	$(CC) $(LDFLAGS) -o $(OUT_LIB) -L$(dir $(OUT_LIB)) -Wl,-soname,$(notdir $(OUT_LIB)) $(OBJS)

clean:
	rm -f $(OBJS) $(OUT_LIB)

.cpp.o:
	$(CC) $(CPPFLAGS) -o $@ $<
