-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (33 loc) · 920 Bytes
/
Makefile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
GCC_COMPILER = gcc
GCC_COMPILER_FLAGS = -ggdb -Wall -W -pedantic -std=c99
XML_INCS = `xml2-config --cflags`
XML_LIBS = `xml2-config --libs`
MISC_LIBS = -lm -lrt -lpthread
MISC_LIBS =
INCS = $(XML_INCS)
LIBS = $(XML_LIBS) $(MISC_LIBS)
TARGET = fnord2licht
#notify level - 1..7
NOTE = 1
SRC_DIRS := .
SRC_FILES := $(foreach DIR, $(SRC_DIRS), $(wildcard $(DIR)/*.c))
OBJS := $(patsubst %.c, %.o, $(SRC_FILES))
note : $(TARGET)
./fnord2licht -a 255 -r 255 -g 255 -b 255 -v -n $(NOTE)
an : $(TARGET)
./fnord2licht -a 255 -r 255 -g 255 -b 255 -v
aus : $(TARGET)
./fnord2licht -a 255 -r 0 -g 0 -b 0 -v
all : $(TARGET)
@echo All done
./fnord2licht -a 255 -r 255 -g 255 -b 255 -v
$(TARGET) : $(OBJS)
$(GCC_COMPILER) $(GCC_COMPILER_FLAGS) -o $@ $^ $(LIBS)
%.o : %.c
$(GCC_COMPILER) $(GCC_COMPILER_FLAGS) -o $@ -c $(INCS) $<
edit:
vim *.c *.h
clean :
rm -f $(OBJS) $(TARGET)
@echo Clean done
.PHONY: clean