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.
 
 
 

46 lines
1.2 KiB

#CC = gcc -O0 -march=native -Wall -pedantic -std=gnu11 -DJL_LEAK_CHECK \
-Warray-bounds
CC = gcc -Wall -std=gnu11 -march=native -Ofast -flto -fopenmp -pthread
LIBS = sndfile jack alsa fftw3
PKGCONFIG = $(shell which pkg-config)
CFLAGS = $(shell $(PKGCONFIG) --cflags $(LIBS))
LDFLAGS = $(shell $(PKGCONFIG) --libs $(LIBS)) \
-Wall -march=native -Ofast -lm -lpthread
SRC = sampler.c sound.c soundconfig.c sample.c fsample.c soundfile.c fx.c \
parse.c jl_ringbuf.c jl_mem.c ini.c init.c main.c
OBJS = $(SRC:.c=.o)
all: jlsampler
%.o: %.c
$(CC) -c -o $(@F) $(CFLAGS) $<
jlsampler: $(OBJS)
$(CC) -o $(@F) $(LDFLAGS) $(OBJS)
SAMPLE_TEST_SRC = sample_test.c sample.c jl_mem.c
SAMPLE_TEST_OBJS = $(SAMPLE_TEST_SRC:.c=.o)
sample_test: $(SAMPLE_TEST_SRC) $(SAMPLE_TEST_OBJS)
$(CC) -o $(@F) $(LDFLAGS) $(SAMPLE_TEST_OBJS)
./sample_test
SOUND_TEST_SRC = sound_test.c sound.c sample.c ini.c jl_mem.c
SOUND_TEST_OBJS = $(SOUND_TEST_SRC:.c=.o)
sound_test: $(SOUND_TEST_SRC) $(SOUND_TEST_OBJS)
$(CC) -o $(@F) $(LDFLAGS) $(SOUND_TEST_OBJS)
./sound_test
test: sample_test sound_test
clean:
rm -f jlsampler $(OBJS) \
$(SAMPLE_TEST_OBJS) sample_test \
$(SOUND_TEST_OBJS) sound_test