mirror of
https://github.com/riwiwa/muzi.git
synced 2025-12-30 04:35:26 -08:00
Added Makefile
This commit is contained in:
25
Makefile
Executable file
25
Makefile
Executable file
@@ -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)
|
||||||
4
muzi.c
4
muzi.c
@@ -27,9 +27,7 @@ int get_artist_plays(void);
|
|||||||
int import_spotify(void);
|
int import_spotify(void);
|
||||||
|
|
||||||
int get_artist_plays(void) {
|
int get_artist_plays(void) {
|
||||||
FILE *fp = fopen("/home/r/dl/spotify-data/rm35@gm - Spotify Extended "
|
FILE *fp = fopen("test.json", "r");
|
||||||
"Streaming History/Streaming_History_Audio_2020-2021_4.json",
|
|
||||||
"r");
|
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
printf("Error while opening file\n");
|
printf("Error while opening file\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user