aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile10
1 files changed, 2 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index ac37253..dc1be1a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,14 @@
CC = gcc
CFLAGS = -Wall -Wextra -O2 -pipe
-LDLIBS =
TARGET = timetolocal
SRC = $(wildcard *.c)
-OBJ = $(SRC:src/%.c=obj/%.o)
PREFIX = /usr/local
all: $(TARGET)
$(TARGET): $(OBJ)
@mkdir -p $(@D)
- $(CC) $(CFLAGS) -o $(TARGET) $(OBJ) $(LDLIBS)
+ $(CC) $(CFLAGS) -o $(TARGET) $(SRC)
install: $(TARGET)
install -D $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(notdir $(TARGET))
@@ -18,9 +16,5 @@ install: $(TARGET)
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/$(notdir $(TARGET))
-obj/%.o: src/%.c
- @mkdir -p $(@D)
- $(CC) $(CFLAGS) -c $< -o $@
-
clean:
- rm -rf obj/ $(TARGET)
+ rm -rf $(TARGET)