summaryrefslogtreecommitdiff
path: root/Makefile
blob: d53562f697dee38d6bdb4d5b2e85be5775c6d628 (plain)
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
BIN = ministat 
SRCS= ministat.c
OBJS= ministat.o

PKGS = 

CFLAGS  += -g -Wall -Werror
CPPFLAGS+= -I. -D_GNU_SOURCE
LDFLAGS += -lm

PREFIX ?= /usr

# No user serviceable parts below this line.
#PPFLAGS+= $(shell pkg-config --silence-errors --cflags $(PKGS))
#LDFLAGS += $(shell pkg-config --silence-errors --libs $(PKGS))

all: $(BIN)

$(BIN): $(OBJS)
	$(CC) $(OBJS) ${LDFLAGS} -o ${BIN}

$(OBJS): %.o: %.c
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $<

install:
	install -d $(PREFIX)/bin
	install -m 0755 $(BIN) $(PREFIX)/bin/$(BIN)

clean:
	-rm -rf $(BIN) *.o *.core

.PHONY: install clean

-include $(DEPS)