Set up plain Makefile
This commit is contained in:
parent
f2ad3c991c
commit
f9813946df
7 changed files with 44 additions and 119 deletions
54
Makefile
54
Makefile
|
@ -1,14 +1,46 @@
|
|||
CC := gcc
|
||||
SRCDIR=src
|
||||
BUILD=build
|
||||
|
||||
all:
|
||||
@./waf build
|
||||
LIBS := \
|
||||
fftw3 \
|
||||
fftw3f \
|
||||
jack \
|
||||
liburiparser \
|
||||
samplerate \
|
||||
x11 \
|
||||
xrender \
|
||||
libvlc
|
||||
|
||||
CC := g++
|
||||
CFLAGS := -Wall -g -DUTILNAMESPACE=BitVisUtil -Ofast -flto -funroll-loops -funswitch-loops -fmodulo-sched -fmodulo-sched-allow-regmoves -funsafe-loop-optimizations -ftracer -fivopts -ftree-loop-ivcanon -ftree-loop-im -ftree-loop-distribution -floop-parallelize-all -floop-block -floop-strip-mine -floop-interchange -fassociative-math -freciprocal-math -fno-trapping-math -fno-signed-zeros
|
||||
LDFLAGS := -flto
|
||||
|
||||
CFLAGS += $(shell pkg-config --cflags $(LIBS)) -I ${SRCDIR}
|
||||
LDFLAGS += $(shell pkg-config --libs $(LIBS))
|
||||
|
||||
$(BUILD)/%.o: $(SRCDIR)/%.cpp
|
||||
@echo [CC] $@
|
||||
@mkdir -p `dirname $@`
|
||||
@$(CC) -o $@ -c $< $(CFLAGS)
|
||||
|
||||
${BUILD}/bin/bitvis: $(patsubst $(SRCDIR)/%.cpp, $(BUILD)/%.o, $(shell find $(SRCDIR)/util $(SRCDIR)/bitvis -name '*.cpp'))
|
||||
@echo [LD] $@
|
||||
@mkdir -p `dirname $@`
|
||||
@$(CC) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
${BUILD}/bin/bitvlc: $(patsubst $(SRCDIR)/%.cpp, $(BUILD)/%.o, $(shell find $(SRCDIR)/util $(SRCDIR)/bitvlc -name '*.cpp'))
|
||||
@echo [LD] $@
|
||||
@mkdir -p `dirname $@`
|
||||
@$(CC) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
${BUILD}/bin/bitx11: $(patsubst $(SRCDIR)/%.cpp, $(BUILD)/%.o, $(shell find $(SRCDIR)/util $(SRCDIR)/bitvlc -name '*.cpp'))
|
||||
@echo [LD] $@
|
||||
@mkdir -p `dirname $@`
|
||||
@$(CC) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: ${BUILD}/bin/bitvis ${BUILD}/bin/bitvlc ${BUILD}/bin/bitx11
|
||||
|
||||
clean:
|
||||
@./waf clean
|
||||
|
||||
distclean:
|
||||
@./waf distclean
|
||||
@rm tags
|
||||
|
||||
ctags:
|
||||
@ctags `find -name \*.[ch]`
|
||||
@rm -rf $(BUILD)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue