diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -1,11 +1,18 @@ +NAME = passgen
+PREFIX = $(HOME)/.local
+
CC = gcc
-CFLAGS = -Wall -Wextra -Wshadow -Werror -pedantic
+CFLAGS += -Wall -Wextra -Wshadow -Werror -pedantic
+
+default: $(NAME)
-default: passgen
+$(NAME): $(NAME).c config.h
+ $(CC) $(CFLAGS) -o $(NAME) $(NAME).c
-passgen: passgen.c
- $(CC) $(CFLAGS) -o passgen passgen.c
+install: $(NAME)
+ install -d $(DESTDIR)$(PREFIX)/bin/
+ install -m 755 $(NAME) $(DESTDIR)$(PREFIX)/bin/
clean:
rm -f *.o
- rm -f passgen
+ rm -f $(NAME)
|