modified: Makefile
modified: README.md new file: src/StudyPlanner.h modified: src/db.h modified: src/ui.c bugfixes. added release target to Makefile to use in other tools.master
parent
0922b8d6b8
commit
c616b98589
10
Makefile
10
Makefile
|
@ -12,11 +12,17 @@ CALF=src/iCal.c src/iCal.h
|
|||
LLST=src/llist.c src/llist.h
|
||||
CONFIG=src/config.h #config file
|
||||
|
||||
ALLF=$(UIF) $(PLF) $(DBF) $(LLST)
|
||||
|
||||
#targets
|
||||
debug: test ui planner db iCal llist
|
||||
gcc test.o ui.o planner.o db.o iCal.o llist.o -o debugOut
|
||||
|
||||
|
||||
release: $(ALLF)
|
||||
gcc -DRELEASE -fPIC -shared -o StudyPlanner.so $(ALLF)
|
||||
|
||||
|
||||
# config: $(CONFIG)
|
||||
llist: $(LLST)
|
||||
gcc -c $(CFLAGS) $(LLST)
|
||||
|
@ -25,7 +31,7 @@ test: src/test.c
|
|||
iCal: $(CALF)
|
||||
gcc -c $(CFLAGS) $(CALF)
|
||||
ui: $(UIF)
|
||||
gcc -c $(CFLAGS) $(UIF)
|
||||
gcc -DDEBUG -c $(CFLAGS) $(UIF)
|
||||
planner: $(PLF)
|
||||
gcc -c $(CFLAGS) $(PLF)
|
||||
db: $(DBF)
|
||||
|
@ -36,7 +42,7 @@ edit:
|
|||
nvim $(PLF) Makefile $(LLST) src/test.c
|
||||
|
||||
clean:
|
||||
rm -rf *.o debugOut src/*.gch *.csv *.ics
|
||||
rm -rf *.o debugOut src/*.gch *.csv *.ics *.so
|
||||
|
||||
|
||||
|
||||
|
|
10
README.md
10
README.md
|
@ -13,6 +13,16 @@
|
|||
|
||||
Time management optimisation tool.
|
||||
|
||||
# How to use
|
||||
|
||||
- to use program directly compile with
|
||||
make debug
|
||||
. this creates executable binary.
|
||||
|
||||
- to integrate in other software use:
|
||||
make release
|
||||
. This creates shared library. use StudyPlanner.h (untested)
|
||||
|
||||
# Procedure
|
||||
|
||||
## User input
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef PLANNER
|
||||
#define PLANNER
|
||||
|
||||
int StudyPlanner();
|
||||
|
||||
#endif // StudyPlanner
|
3
src/db.h
3
src/db.h
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include "planner.h"
|
||||
|
||||
#endif
|
||||
|
||||
void write_linkedlist_to_csv(llist *head, const char *filename);
|
||||
llist *write_csv_to_llist(const char *filename);
|
||||
#endif
|
||||
|
|
7
src/ui.c
7
src/ui.c
|
@ -23,8 +23,13 @@
|
|||
#define hours(n) (60 * minutes(n))
|
||||
#define days(n) (24 * hours(n))
|
||||
const char *dbName = "db.csv";
|
||||
|
||||
// #define DEBUG
|
||||
#ifdef DEBUG
|
||||
int main(void) {
|
||||
#endif
|
||||
#ifdef RELEASE
|
||||
int StudyPlanner() {
|
||||
#endif
|
||||
int taskcreation_date = 0;
|
||||
int taskdeadline_date = 0;
|
||||
int taskpriority = 0;
|
||||
|
|
Loading…
Reference in New Issue