insert_event (#1)

Option to insert events seems to work.

Reviewed-on: bjoernf/ics_analyzer#1
Co-authored-by: bjoernf <bjoern.foersterling@web.de>
Co-committed-by: bjoernf <bjoern.foersterling@web.de>
This commit is contained in:
2023-09-09 08:26:50 +02:00
committed by bjoernf
parent c713522736
commit 061ed30333
17 changed files with 452 additions and 188 deletions

View File

@ -1,33 +1,42 @@
.PHONY:all
all:
gcc -Wall *.c
CC = gcc
CFLAGS = -Wall
LDFLAGS = -luuid
.PHONY:debug
debug:
gcc -Wall -g *.c
gdb a.out
# List of all source files (assuming they're all in the same directory)
SRC_FILES = $(wildcard *.c)
.PHONY:run
run:
gcc -Wall *.c
./a.out
# Generate a list of object files by replacing the .c extension with .o
OBJ_FILES = $(SRC_FILES:.c=.o)
EXECUTABLE = "icscli"
# linking
$(EXECUTABLE): $(OBJ_FILES)
gcc -Wall $(OBJ_FILES) -o $(EXECUTABLE) $(LDFLAGS)
main.o: main.c
$(CC) $(CFLAGS) -c $<
# use implicit rule to compile C source files to object files
%.o: %.c %.h
$(CC) $(CFLAGS) -c $<
.PHONY:install
install: a.out
cp a.out /usr/local/bin/ics_analyzer
install: $(EXECUTABLE)
cp $(EXECUTABLE) /usr/local/bin/$(EXECUTABLE)
.PHONY:clean
clean:
-rm a.out
-rm $(EXECUTABLE) *.o
.PHONY:uninstall
uninstall:
-rm /usr/local/bin/ics_analyzer
-rm /usr/local/bin/$(EXECUTABLE)
.PHONY:test
test:
./a.out
./$(EXECUTABLE)
@echo
./a.out -h
./$(EXECUTABLE) -h
@echo
./a.out -f ../tests/calendar.ics
./$(EXECUTABLE) -f ../tests/calendar.ics