This patch adds a new option to building: -w. What this option does is it runs the build system on any change detected in either src/ or lib/. This is a really convenient option since you don't need to type "tbuild b" every time. Signed-off-by: xSlendiX <slendi@socopon.com>
30 lines
502 B
Makefile
30 lines
502 B
Makefile
CC=cc
|
|
CFLAGS=-O0 -ggdb -Wall -lpthread
|
|
|
|
.PHONY: all clean install
|
|
|
|
all: tbuild
|
|
|
|
tbuild: main.o tomlc99/toml.o
|
|
$(CC) $(CFLAGS) tomlc99/toml.o main.o -o tbuild
|
|
|
|
main.o: main.c
|
|
$(CC) $(CFLAGS) -c main.c -o main.o
|
|
|
|
tomlc99/toml.o:
|
|
cd tomlc99 && $(MAKE) && cd ..
|
|
|
|
clean:
|
|
rm -f tbuild main.o tomlc99/toml.o
|
|
|
|
install:
|
|
ifeq ($(OS),Windows_NT)
|
|
mkdir "C:\tbuild" ; \
|
|
copy tbuild "C:\tbuild" ; \
|
|
copy RedSeaGen.exe "C:\tbuild" ;
|
|
else
|
|
install tbuild /usr/local/bin
|
|
install RedSeaGen /usr/local/bin
|
|
endif
|
|
|