piezo sensors to OSC messages
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.2 KiB

# this is a lazy generic makefile
# mostly from :
# https://spin.atomicobject.com/2016/08/26/makefile-c-projects/
TARGET ?= bin/$(shell basename $(CURDIR))
SRC_DIRS ?= ./src
CFLAGS += -std=c99 -pipe -finput-charset=UTF-8 -g -D_POSIX_C_SOURCE=200809L
CFLAGS += -Wall -Wwrite-strings
CFLAGS += -Wconversion -Wshadow -Wstrict-prototypes
CFLAGS += -Werror=implicit-function-declaration -Werror=implicit-int
CFLAGS += -Werror=incompatible-pointer-types -Werror=int-conversion
# links for system libraries, for example liblo
CFLAGS += -llo
SRCS := $(shell find $(SRC_DIRS) -name *.cpp -or -name *.c -or -name *.s)
OBJS := $(addsuffix .o,$(basename $(SRCS)))
DEPS := $(OBJS:.o=.d)
INC_DIRS := $(shell find $(SRC_DIRS) -type d)
INC_FLAGS := $(addprefix -I,$(INC_DIRS))
all: release
release: CFLAGS += -O3 -DNDEBUG
release: $(TARGET)
debug: CFLAGS += -DDEBUG -Wpedantic -Wextra
debug: $(TARGET)
-include $(DEPS)
install: all
install -d $(DESTDIR)
install $(TARGET) $(DESTDIR)
clang-format-8 -i $(SRCS)