diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 17 insertions, 6 deletions
@@ -1,19 +1,30 @@ +# See COPYING file for copyright, license and warranty details. + +include config.mk + SRC = getgbook.c OBJ = $(SRC:.c=.o) +BIN = $(SRC:.c=) -all: getgbook +all: $(BIN) + +$(OBJ): util.c .c.o: @echo CC $< - @$(CC) -c -g -Wall -Werror $(CFLAGS) $< - -$(OBJ): util.c + @$(CC) -c $(CFLAGS) $< getgbook: $(OBJ) @echo LD $@ @$(CC) -o $@ $(OBJ) $(LDFLAGS) +install: all + cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin + +uninstall: + cd $(DESTDIR)$(PREFIX)/bin && rm -f $(BIN) + clean: - rm -f -- getgbook $(OBJ) + rm -f -- $(BIN) $(OBJ) -.PHONY: all clean +.PHONY: all clean install uninstall |