2020-04-18 15:09:33 -07:00
|
|
|
PREFIX=
|
|
|
|
CC ?= gcc
|
|
|
|
O ?= -O2
|
|
|
|
CFLAGS=-std=c99 -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L
|
|
|
|
CWARN=-Wall -Wpedantic -Wextra -Wno-unknown-pragmas -Wno-missing-field-initializers\
|
|
|
|
-Wno-padded -Wsign-conversion -Wno-missing-noreturn -Wno-cast-qual -Wtype-limits
|
|
|
|
#CFLAGS += -fsanitize=address -fno-omit-frame-pointer
|
2020-04-20 13:51:51 -07:00
|
|
|
ifeq ($(shell uname -s),Darwin)
|
2020-04-20 13:49:57 -07:00
|
|
|
CFLAGS += -D_DARWIN_C_SOURCE
|
|
|
|
endif
|
2020-04-18 15:09:33 -07:00
|
|
|
G=
|
|
|
|
|
2020-04-18 21:18:23 -07:00
|
|
|
all: checksyntax
|
|
|
|
|
|
|
|
checksyntax: btui.h
|
|
|
|
$(CC) $(CFLAGS) $(CWARN) $(G) $(O) -fsyntax-only $<
|
2020-04-18 15:09:33 -07:00
|
|
|
|
|
|
|
clean:
|
2020-04-18 21:19:03 -07:00
|
|
|
@cd Lua; make clean
|
2020-04-18 21:18:23 -07:00
|
|
|
@cd C; make clean
|
2020-04-18 22:47:24 -07:00
|
|
|
@cd Python; make clean
|
2020-04-18 15:09:33 -07:00
|
|
|
|
|
|
|
%: %.c btui.h
|
|
|
|
$(CC) $(CFLAGS) $(CWARN) $(G) $(O) $< -o $@
|
|
|
|
|
2020-04-18 21:18:23 -07:00
|
|
|
c:
|
|
|
|
@cd C; make
|
|
|
|
|
|
|
|
testc:
|
|
|
|
@cd C; make test
|
|
|
|
|
2020-04-19 00:31:57 -07:00
|
|
|
rainbow:
|
|
|
|
@cd C; make rainbowdemo
|
|
|
|
|
2020-04-18 21:18:23 -07:00
|
|
|
lua:
|
2020-04-18 21:19:03 -07:00
|
|
|
@cd Lua; make
|
2020-04-18 21:18:23 -07:00
|
|
|
|
|
|
|
testlua:
|
2020-04-18 21:19:03 -07:00
|
|
|
@cd Lua; make test
|
2020-04-18 21:18:23 -07:00
|
|
|
|
2020-04-19 15:46:41 -07:00
|
|
|
python:
|
|
|
|
@cd Python; make
|
|
|
|
|
|
|
|
testpython:
|
|
|
|
@cd Python; make test
|
|
|
|
|
|
|
|
.PHONY: all, checksyntax, clean, c, testc, lua, testlua, python, testpython
|