mirror of
https://git.faggot-chan.online/timetolocal/
synced 2026-11-05 05:25:43 +01:00
fixed a makefile thing and added the thingy that does things
This commit is contained in:
1 parent
1535072cc9
commit
4144b61070
3 files changed
+38
-5
No files matched your search
@@ -2,13 +2,16 @@ CC = gcc
|
||||
CFLAGS = -Wall -Wextra -O2 -pipe
|
||||
TARGET = timetolocal
|
||||
SRC = $(wildcard *.c)
|
||||
OBJ = $(SRC:.c=.o)
|
||||
PREFIX = /usr/local
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJ)
|
||||
@mkdir -p $(@D)
|
||||
$(CC) $(CFLAGS) -o $(TARGET) $(SRC)
|
||||
$(CC) $(CFLAGS) -o $(TARGET) $(OBJ)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
install: $(TARGET)
|
||||
install -D $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(notdir $(TARGET))
|
||||
@@ -17,4 +20,7 @@ uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/$(notdir $(TARGET))
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET)
|
||||
rm -f $(TARGET) $(OBJ)
|
||||
|
||||
.PHONY: all install uninstall clean
|
||||
|
||||
Reference in new issue
Block a user