CPP=g++
STRIP=strip
+BMCO_CPPFLAGS=`xml2-config --cflags` `wx-config --cxxflags` -std=c++11 -Os -I./common -ggdb
CPPFLAGS=`xml2-config --cflags` `wx-config --cxxflags` -std=c++11 -Os -I./common -ggdb
-CPPLIBS=`wx-config --libs` `curl-config --libs` -lxml2
+BMCO_CPPLIBS=`wx-config --libs` `curl-config --libs` -lxml2
+CPPLIBS=`wx-config --libs` `curl-config --libs` -lxml2 -Llibraries -lCalendarDataStorage -lsqlite3
+CDSLIBS=-lsqlite3
MAKE=make
RM=rm
MAINOBJS=main.o AppXestiaCalendar.o
BMCOOBJS=tools/bitmapcode.o
-COMMONOBJS=common/monthviewgen.o
+COMMONOBJS=common/monthviewgen.o common/file.o common/text.o \
+ common/uuid.o common/preferences.o common/dirs.o common/defaults.o
FORM_MAINOBJS=forms/main/frmMain.o
+FORM_PREFERENCESOBJS=forms/preferences/frmPreferences.o
WIDGETSOBJS=widgets/XCCalendarCtrl.o widgets/XCCalendarDay.o \
widgets/XCCalendarDayEntry.o widgets/XCCalendarMonthView.o \
widgets/XCCalendarMonthViewDayTitle.o \
widgets/XCCalendarManipulator.o \
- widgets/XCCalendarMonthSelect.o
+ widgets/XCCalendarMonthSelect.o \
+ widgets/XCCalendarList.o \
+ widgets/XCCalendarListAccountCtrl.o \
+ widgets/XCCalendarListCalendarCtrl.o
+CALENDARLISTOBJS=objects/calendarlist/CalendarList.o
+CALENDAROBJS=objects/calendarobject/CalendarObject-Save.o \
+ objects/calendarobject/CalendarObject.o
+CALENDAREVENTOBJS=objects/calendarevent/CalendarEvent-Save.o \
+ objects/calendarevent/CalendarEvent.o
+CDSOBJS=libraries/CalendarDataStorage/CalendarDataStorage.o
default:
$(MAKE) bitmaphelper
+ $(MAKE) calendardatastorage
$(MAKE) xestiacal
-xestiacal: mainobjs form_mainobjs widgetsobjs commonobjs
+forms: form_mainobjs form_preferencesobjs
+
+xestiacal: mainobjs forms widgetsobjs commonobjs calendarlistobjs calendarobjs calendareventobjs
$(CPP) -Os $(MAINOBJS) $(FORM_MAINOBJS) $(WIDGETSOBJS) \
- $(COMMONOBJS) \
+ $(COMMONOBJS) $(CALENDARLISTOBJS) $(CALENDAROBJS) $(CALENDAREVENTOBJS) \
-o $(XCAL_OUT) $(CPPLIBS)
bitmaphelperobjs: $(BMCOOBJS)
bitmaphelper: bitmaphelperobjs
- $(CPP) $(CPPFLAGS) $(BMCOOBJS) -o $(BMCO_HELP) $(CPPLIBS)
+ $(CPP) $(BMCO_CPPFLAGS) $(BMCOOBJS) -o $(BMCO_HELP) $(BMCO_CPPLIBS)
$(BMCO_HELP) bitmaps/
clean:
find . -name "*.o" -type f -delete
+ find . -name "*.a" -type f -delete
$(RM) -f ./xestiacal
mainobjs: $(MAINOBJS)
form_mainobjs: $(FORM_MAINOBJS)
+form_preferencesobjs: $(FORM_PREFERENCESOBJS)
+
widgetsobjs: $(WIDGETSOBJS)
commonobjs: $(COMMONOBJS)
+calendarlistobjs: $(CALENDARLISTOBJS)
+
+calendarobjs: $(CALENDAROBJS)
+
+calendareventobjs: $(CALENDAREVENTOBJS)
+
+calendardatastorage:
+ g++ -c -ggdb --std=c++11 libraries/CalendarDataStorage/CalendarDataStorage.cpp -o libraries/CalendarDataStorage/CalendarDataStorage.o -lsqlite3
+ ar rcs libraries/libCalendarDataStorage.a libraries/CalendarDataStorage/CalendarDataStorage.o
+
test:
cd tests
g++ `xml2-config --cflags --libs` -ggdb --std=c++11 -lcurl -lgtest -pthread xestiacalendar_test.cpp xestiacalendar_testcommon.cpp ../objects/calendarevent/CalendarEvent.cpp ../objects/calendartask/CalendarTask.cpp ../objects/calendarjournal/CalendarJournal.cpp ../objects/calendarfreebusy/CalendarFreeBusy.cpp ../objects/calendartimezone/CalendarTimezone.cpp ../objects/calendarobject/CalendarObject.cpp ../common/file.cpp ../common/text.cpp ../objects/CalDAV/CalDAV.cpp ../objects/CalDAV/CalDAV-XMLProcessing.cpp -o xestiacalendar_test