35 lines
697 B
Makefile
35 lines
697 B
Makefile
CC=cc
|
|
CFLAGS=-O0 -ggdb -Wall -lpthread
|
|
DESTDIR=/usr/local
|
|
|
|
.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 $(DESTDIR)/bin
|
|
install RedSeaGen $(DESTDIR)/bin
|
|
install -d $(DESTDIR)/share/man/man1
|
|
install -m 644 man/*.1 $(DESTDIR)/share/man/man1
|
|
install -d $(DESTDIR)/share/man/man5
|
|
install -m 644 man/*.5 $(DESTDIR)/share/man/man5
|
|
endif
|
|
|