2011-01-25 20:26:29 +01:00
|
|
|
CXXFLAGS+=`wx-config --cxxflags` -Wall -Isrc -ggdb
|
2010-05-14 15:04:01 +02:00
|
|
|
CXXFLAGS+=-I./lib/wxsqlite3-1.9.9/include
|
|
|
|
CXXFLAGS+=-I./lib/freechart/include
|
|
|
|
|
2011-01-25 20:26:29 +01:00
|
|
|
LDFLAGS+=`wx-config --libs`
|
2011-02-05 21:02:03 +01:00
|
|
|
ifdef WIN32
|
|
|
|
LDFLAGS+=-L./lib/wxsqlite3-1.9.9/lib/ -lwxcode_msw_wxsqlite3-2.8
|
|
|
|
LDFLAGS+=-L./lib/freechart/lib -lwxcode_msw_freechart-2.8
|
|
|
|
else
|
2010-05-14 15:04:01 +02:00
|
|
|
LDFLAGS+=-L./lib/wxsqlite3-1.9.9/lib/ -lwxcode_gtk2u_wxsqlite3-2.8
|
|
|
|
LDFLAGS+=-L./lib/freechart/lib -lwxcode_gtk2u_freechart-2.8
|
2011-02-05 21:02:03 +01:00
|
|
|
endif
|
2010-05-14 15:04:01 +02:00
|
|
|
|
2011-01-25 20:26:29 +01:00
|
|
|
CXX=$(PREFIX)g++
|
2010-05-14 15:04:01 +02:00
|
|
|
|
2010-07-04 17:42:14 +02:00
|
|
|
SOURCES=$(wildcard src/model/*.cpp)
|
|
|
|
SOURCES+=$(wildcard src/view/*.cpp)
|
2010-09-04 11:54:49 +02:00
|
|
|
SOURCES+=$(wildcard src/view/grid/*.cpp)
|
2010-07-04 17:42:14 +02:00
|
|
|
SOURCES+=$(wildcard src/controller/*.cpp)
|
2010-10-14 20:49:49 +02:00
|
|
|
SOURCES+=src/main.cpp src/sha1.cpp src/ParseExp.cpp
|
2010-07-04 17:42:14 +02:00
|
|
|
HEADERS=$(wildcard src/model/*.h)
|
|
|
|
HEADERS+=$(wildcard src/view/*.h)
|
2010-09-04 11:54:49 +02:00
|
|
|
HEADERS+=$(wildcard src/view/grid/*.h)
|
2010-07-04 17:42:14 +02:00
|
|
|
HEADERS+=$(wildcard src/controller/*.h)
|
|
|
|
HEADERS+=src/main.h src/sha1.h
|
2010-05-15 12:05:39 +02:00
|
|
|
OBJS=$(SOURCES:.cpp=.o)
|
2010-05-14 15:04:01 +02:00
|
|
|
|
2010-12-11 09:51:44 +01:00
|
|
|
all: check kc
|
2010-05-14 15:04:01 +02:00
|
|
|
|
|
|
|
clean:
|
2010-09-04 11:54:49 +02:00
|
|
|
rm -f *~ src/*~ src/*.o src/model/*.o src/model/*~ src/view/*.o src/view/grid/*.o src/view/grid/*~ src/view/*~ src/controller/*.o src/controller/*~ kc
|
2010-05-14 15:04:01 +02:00
|
|
|
|
2010-09-04 11:54:49 +02:00
|
|
|
%.o : src/model/%.cpp src/view/%.cpp src/view/grid/%.cpp src/controller/%.cpp src/%.cpp
|
2010-05-15 12:05:39 +02:00
|
|
|
$(CXX) $(CXXFLAGS) $< -c
|
|
|
|
|
2010-12-11 09:51:44 +01:00
|
|
|
check:
|
|
|
|
if ! test -d lib ; then echo lib directory not found, please see INSTALL ; return 1 ; fi
|
|
|
|
|
2010-05-15 12:05:39 +02:00
|
|
|
kc: $(OBJS)
|
2010-07-04 19:39:39 +02:00
|
|
|
$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)
|
|
|
|
|
2011-01-25 20:26:29 +01:00
|
|
|
generate_locales:
|
|
|
|
./tools/generate_locales.sh
|
|
|
|
|
2011-02-05 21:02:03 +01:00
|
|
|
ifdef WIN32
|
|
|
|
package:
|
|
|
|
./tools/package_win32.sh
|
|
|
|
else
|
2011-01-25 20:26:29 +01:00
|
|
|
package:
|
|
|
|
./tools/package.sh
|
2011-03-05 12:26:35 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
install:
|
|
|
|
mkdir -p $(DESTDIR)/usr/lib/kisscount/
|
|
|
|
mkdir -p $(DESTDIR)/usr/bin
|
|
|
|
cp kc $(DESTDIR)/usr/lib/kisscount/
|
|
|
|
cp -r lib/freechart/lib/*.so* lib/wxsqlite3-1.9.9/lib/*.so* $(DESTDIR)/usr/lib/kisscount/
|
|
|
|
cp tools/launch_kc.sh $(DESTDIR)/usr/lib/kisscount/
|
|
|
|
cp -r ressources $(DESTDIR)/usr/lib/kisscount/
|
|
|
|
cp init.sql $(DESTDIR)/usr/lib/kisscount/
|
|
|
|
ln -s $(DESTDIR)/usr/lib/kisscount/launch_kc.sh $(DESTDIR)/usr/bin/kc
|