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
ketrptr 2024-12-16 18:23:24 +01:00
parent 0922b8d6b8
commit c616b98589
5 changed files with 182 additions and 156 deletions

View File

@ -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

View File

@ -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

6
src/StudyPlanner.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef PLANNER
#define PLANNER
int StudyPlanner();
#endif // StudyPlanner

View File

@ -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

View File

@ -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;