diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..67df7c0 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +CC=gcc +CFLAGS=-Wall -Wextra -Wpedantic -std=c11 -fdiagnostics-color=always -D_DEFAULT_SOURCE -g -I./include +LIBS=-Wl,--no-as-needed -lcjson -lzip +TARGET=muzi +SOURCES = muzi.c +OBJECTS = $(SOURCES:.c=.o) + +OUTDIR=./build +OBJDIR=$(OUTDIR)/obj + +$(shell mkdir -p $(OBJDIR)) + +%.o: %.c + $(CC) -c -o $(OBJDIR)/$@ $< $(CFLAGS) + +$(TARGET): $(OBJECTS) + $(CC) -o $(OUTDIR)/$@ $(OBJDIR)/$(OBJECTS) $(CFLAGS) $(LIBS) + +.PHONY: all +all: $(TARGET) + +.DEFAULT_GOAL := all + +clean: + rm -rf $(OUTDIR) diff --git a/muzi.c b/muzi.c index 609e7cb..b518d84 100644 --- a/muzi.c +++ b/muzi.c @@ -27,9 +27,7 @@ int get_artist_plays(void); int import_spotify(void); int get_artist_plays(void) { - FILE *fp = fopen("/home/r/dl/spotify-data/rm35@gm - Spotify Extended " - "Streaming History/Streaming_History_Audio_2020-2021_4.json", - "r"); + FILE *fp = fopen("test.json", "r"); if (fp == NULL) { printf("Error while opening file\n"); return 1;