62 lines
1.8 KiB
Makefile
62 lines
1.8 KiB
Makefile
CXXFLAGS+=`wx-config --cxxflags` -Wall -Isrc -ggdb
|
|
CXXFLAGS+=-I./lib/wxsqlite3-1.9.9/include
|
|
CXXFLAGS+=-I./lib/freechart/include
|
|
|
|
LDFLAGS+=`wx-config --libs`
|
|
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
|
|
LDFLAGS+=-L./lib/wxsqlite3-1.9.9/lib/ -lwxcode_gtk2u_wxsqlite3-2.8
|
|
LDFLAGS+=-L./lib/freechart/lib -lwxcode_gtk2u_freechart-2.8
|
|
endif
|
|
|
|
CXX=$(PREFIX)g++
|
|
|
|
SOURCES=$(wildcard src/model/*.cpp)
|
|
SOURCES+=$(wildcard src/view/*.cpp)
|
|
SOURCES+=$(wildcard src/view/grid/*.cpp)
|
|
SOURCES+=$(wildcard src/controller/*.cpp)
|
|
SOURCES+=src/main.cpp src/sha1.cpp src/ParseExp.cpp
|
|
HEADERS=$(wildcard src/model/*.h)
|
|
HEADERS+=$(wildcard src/view/*.h)
|
|
HEADERS+=$(wildcard src/view/grid/*.h)
|
|
HEADERS+=$(wildcard src/controller/*.h)
|
|
HEADERS+=src/main.h src/sha1.h
|
|
OBJS=$(SOURCES:.cpp=.o)
|
|
|
|
all: check kc
|
|
|
|
clean:
|
|
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
|
|
|
|
%.o : src/model/%.cpp src/view/%.cpp src/view/grid/%.cpp src/controller/%.cpp src/%.cpp
|
|
$(CXX) $(CXXFLAGS) $< -c
|
|
|
|
check:
|
|
if ! test -d lib ; then echo lib directory not found, please see INSTALL ; return 1 ; fi
|
|
|
|
kc: $(OBJS)
|
|
$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)
|
|
|
|
generate_locales:
|
|
./tools/generate_locales.sh
|
|
|
|
ifdef WIN32
|
|
package:
|
|
./tools/package_win32.sh
|
|
else
|
|
package:
|
|
./tools/package.sh
|
|
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
|