rewrote Makefile + copyright and license infos
[smdp.git] / test / Makefile
1 # set some compiler flags
2 CFLAGS=-g -Wall -lncurses
3
4 # find *.c in the current directory
5 SOURCES=$(wildcard *.c)
6
7 # define the output objects by replacing .c with .o
8 TARGETS=$(SOURCES:.c=)
9
10 # this will make all objects
11 all: $(TARGETS) 
12
13 # each objects will be build by a *.c file
14 #%.o: %.c
15 %: %.c
16         cc $(CFLAGS) -o $@ $^
17
18 # this will delete all objects
19 # if not all objects are there, they will be compiled first
20 clean: $(TARGETS)
21         rm -f $^
22