dtms

annotate Makefile @ 2:8c78b58857f9

readme
author Eleni Maria Stea <eleni@mutantstargoat.com>
date Fri, 13 May 2016 21:14:33 +0300
parents
children db4bb4b5905a
rev   line source
eleni@0 1 src = $(wildcard src/*.c)
eleni@0 2 obj = $(src:.c=.o)
eleni@0 3 dep = $(obj:.o=.d)
eleni@0 4 bin = dtms
eleni@0 5
eleni@0 6 dbg = -g
eleni@0 7 opt = -O0
eleni@0 8
eleni@0 9 CC = gcc
eleni@0 10 INCLUDE = -I/usr/include
eleni@0 11 CFLAGS = -pedantic -Wall -std=c99 -D_XOPEN_SOURCE=600 $(dbg) $(INCLUDE)
eleni@0 12 LDFLAGS = -L/usr/lib $(libs)
eleni@0 13
eleni@0 14 $(bin): $(obj)
eleni@0 15 $(CC) -o $@ $(obj) $(LDFLAGS)
eleni@0 16
eleni@0 17 -include $(dep)
eleni@0 18
eleni@0 19 %.d: %.c
eleni@0 20 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
eleni@0 21
eleni@0 22 .PHONY: clean
eleni@0 23 clean:
eleni@0 24 rm -f $(obj) $(bin) $(dep)