2019-08-22 15:30:51 +02:00
|
|
|
LUA_CFLAGS=$(shell pkg-config --cflags lua5.3)
|
|
|
|
LUA_LIBS=$(shell pkg-config --libs lua5.3)
|
2012-07-28 01:30:20 +02:00
|
|
|
|
2012-07-13 21:18:35 +02:00
|
|
|
CC=gcc
|
2012-07-28 01:30:20 +02:00
|
|
|
CFLAGS+=-O2 -Wall -march=native -pedantic -std=c99 -D_POSIX_C_SOURCE=20120607L -D_XOPEN_SOURCE $(LUA_CFLAGS)
|
|
|
|
LIBS=-lm -lpthread -lrt $(LUA_LIBS)
|
2012-07-13 21:18:35 +02:00
|
|
|
|
|
|
|
TARGET=musiclight2
|
2018-06-24 22:23:39 +02:00
|
|
|
SOURCE=main.c fft.c utils.c sk6812.c lua_utils.c lua_wrappers.c lut.c
|
|
|
|
DEPS=config.h fft.h utils.h sk6812.h lua_utils.h lua_wrappers.h lut.h
|
2012-07-13 21:18:35 +02:00
|
|
|
|
|
|
|
OBJ=$(patsubst %.c, %.o, $(SOURCE))
|
|
|
|
|
|
|
|
$(TARGET): $(OBJ) $(DEPS)
|
|
|
|
$(CC) -o $(TARGET) $(OBJ) $(LIBS)
|
|
|
|
|
|
|
|
%.o: %.c $(DEPS)
|
|
|
|
$(CC) -c $(CFLAGS) -o $@ $< $(INCLUDES)
|
|
|
|
|
|
|
|
doc:
|
|
|
|
doxygen doxygen.conf
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(TARGET)
|
|
|
|
rm -f $(OBJ)
|