prepare Makefile for simple build - lchat - A line oriented chat front end for ii.
HTML git clone git://git.suckless.org/lchat
DIR Log
DIR Files
DIR Refs
DIR README
---
DIR commit 58ad5be221963b990efdc0087e1203080e1f608a
DIR parent 197736f5ab3283803a6ff9925ec9418decb746a1
HTML Author: Jan Klemkow <j.klemkow@wemelug.de>
Date: Fri, 23 Oct 2015 23:19:07 +0200
prepare Makefile for simple build
Diffstat:
M Makefile | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
---
DIR diff --git a/Makefile b/Makefile
@@ -1,5 +1,17 @@
CC=cc
CFLAGS=-std=c99 -pedantic -Wall -Wextra
-lchat: lchat.c
- $(CC) $(CFLAGS) -o $@ lchat.c
+.PHONY: all clean
+
+all: lchat
+clean:
+ rm -f *.o
+
+lchat: lchat.o slackline.o
+ $(CC) -o $@ lchat.o slackline.o
+
+lchat.o: lchat.c
+ $(CC) -c $(CFLAGS) -o $@ lchat.c
+
+slackline.o: slackline.c slackline.h
+ $(CC) -c $(CFLAGS) -o $@ slackline.c