Skip to content
Snippets Groups Projects
Commit 40d433fd authored by Bartłomiej Piotrowski's avatar Bartłomiej Piotrowski
Browse files

Rewrite Makefile

- use implicit rule to create the binary
- aim at C99 by default
- use install to put the executable in correct place
- use 'rm -f' in clean target
- remove unused variables
parent c3fffb4d
No related branches found
No related tags found
No related merge requests found
PROJ = fanout SRC = fanout.c
OBJS = OBJ = ${SRC:.c=.o}
CC = gcc CFLAGS = -std=c99 -Wall -g
DEBUG = -g
CFLAGS = -Wall -c $(DEBUG)
LFLAGS = -Wall $(DEBUG)
DESTDIR = / DESTDIR = /
.PHONY : $(OBJS) fanout:
fanout : fanout.c install: fanout
$(CC) $(LFLAGS) $(OBJS) -o $(PROJ) fanout.c install -Dm755 fanout $(DESTDIR)/usr/bin/fanout
install:
mkdir -p $(DESTDIR)/usr/sbin
cp fanout $(DESTDIR)/usr/sbin/fanout
clean: clean:
test \! -f fanout || rm fanout rm -f fanout
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment