fix make & mise au propre du projet

This commit is contained in:
Puechberty Arthur
2026-06-26 21:54:33 +02:00
parent 9e02e75a98
commit 290da5ed46
12 changed files with 467 additions and 234 deletions
+12 -12
View File
@@ -5,21 +5,21 @@ SRC = main.c sysinfo.c logos.c config.c renderer.c
all: $(TARGET)
$(TARGET): $(SRC)
$(CC) $(CFLAGS) -o $(TARGET) $(SRC)
$(TARGET): $(SRC)
$(CC) $(CFLAGS) -o $(TARGET) $(SRC)
install: $(TARGET)
mkdir -p $(DESTDIR)/usr/bin
cp $(TARGET) $(DESTDIR)/usr/bin/
mkdir -p $(DESTDIR)/usr/share/optifetch/logos
cp -r logos/*.txt $(DESTDIR)/usr/share/optifetch/logos/ 2>/dev/null || true
mkdir -p $(DESTDIR)/etc
cp optifetch.conf $(DESTDIR)/etc/optifetch.conf 2>/dev/null || touch $(DESTDIR)/etc/optifetch.conf
mkdir -p $(DESTDIR)/usr/bin
cp $(TARGET) $(DESTDIR)/usr/bin/
mkdir -p $(DESTDIR)/usr/share/optifetch/logos
cp -r logos/*.txt $(DESTDIR)/usr/share/optifetch/logos/ 2>/dev/null || true
mkdir -p $(DESTDIR)/etc
cp optifetch.conf $(DESTDIR)/etc/optifetch.conf 2>/dev/null || touch $(DESTDIR)/etc/optifetch.conf
uninstall:
rm -f $(DESTDIR)/usr/bin/$(TARGET)
rm -rf $(DESTDIR)/usr/share/optifetch
rm -f $(DESTDIR)/etc/optifetch.conf
rm -f $(DESTDIR)/usr/bin/$(TARGET)
rm -rf $(DESTDIR)/usr/share/optifetch
rm -f $(DESTDIR)/etc/optifetch.conf
clean:
rm -f $(TARGET)
rm -f $(TARGET)