diff options
| author | david <[email protected]> | 2026-10-06 04:21:57 -0300 |
|---|---|---|
| committer | david <[email protected]> | 2026-10-06 04:21:57 -0300 |
| commit | 4144b610705d157c812cea0a2bff931c35afe1d0 (patch) | |
| tree | ef1d5bfd9d4e03ee6926e42fc212641d97c0729b /Makefile | |
| parent | 1535072cc90c95e2b580f7394244300309f69dc2 (diff) | |
| download | timetolocal-4144b610705d157c812cea0a2bff931c35afe1d0.tar.gz timetolocal-4144b610705d157c812cea0a2bff931c35afe1d0.zip | |
fixed a makefile thing and added the thingy that does things
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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 + |
