-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
43 lines (31 loc) · 904 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#######################################################################
# Makefile for the dailyfile project.
#
# Copyright 2017 Christophe BLAESS (https://www.blaess.fr/christophe).
#
# License GPLv3+: This is free software: you are free to change and
# redistribute it.There is NO WARRANTY, to the extent permitted by law.
#
#######################################################################
EXE = dailyfile
OBJ = dailyfile.o
DIR = /usr/local/bin/
CROSS_COMPILE ?=
CC = gcc
CFLAGS = -Wall -W -DPROGRAM_VERSION="$(shell git describe 2>/dev/null | tr -d '\r\n')"
LDFLAGS =
.PHONY: all
all: $(EXE)
$(EXE): $(OBJ)
$(CROSS_COMPILE)$(CC) -o $(EXE) $(OBJ) $(LDFLAGS)
%.o:%.c
$(CROSS_COMPILE)$(CC) $(CFLAGS) -c $<
.PHONY: clean
clean:
rm -f $(EXE) $(OBJ) *~
.PHONY: install
install: $(EXE)
cp $(EXE) $(DIR)
.PHONY: uninstall
uninstall:
rm -f $(DIR)$(EXE)