Skip to content

Commit

Permalink
Makefile tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
falkTX committed May 12, 2016
1 parent a36bf9e commit c209efe
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Makefile
@@ -1,12 +1,16 @@

CC ?= gcc
CC ?= gcc
CXX ?= g++

CFLAGS += $(shell pkg-config --cflags jack)
LDFLAGS += $(shell pkg-config --libs jack)

TESTS=test_new test_cond_wait test_cond_wait_simple test_printf

all: jack_interposer.so

jack_interposer.so: jack_interposer.c checkers.c manual.c
$(CC) $< $(CFLAGS) -Wall -fPIC $(LDFLAGS) -Wl,--no-undefined -shared -pthread -ldl -ljack -o jack_interposer.so
$(CC) $< -o $@ $(CFLAGS) -Wall -fPIC $(LDFLAGS) -Wl,--no-undefined -shared -pthread -ldl

checkers.c: functions checker_fragment.c
./generate_checkers.pl < functions
Expand All @@ -21,13 +25,13 @@ test: $(TESTS) jack_interposer.so
LD_PRELOAD=./jack_interposer.so ./test_printf

test_new: test_new.cpp
g++ -o test_new test_new.cpp -ljack
$(CXX) $< -o $@ $(CFLAGS) $(LDFLAGS)

test_cond_wait_simple: test_cond_wait_simple.c
gcc -o test_cond_wait_simple test_cond_wait_simple.c -pthread -ldl
$(CC) $< -o $@ $(CFLAGS) $(LDFLAGS) -pthread -ldl

test_cond_wait: test_cond_wait.c
gcc -o test_cond_wait test_cond_wait.c -ljack -lpthread
$(CC) $< -o $@ $(CFLAGS) $(LDFLAGS) -pthread

test_printf: test_printf.c
gcc -o test_printf test_printf.c -ljack
$(CC) $< -o $@ $(CFLAGS) $(LDFLAGS)

0 comments on commit c209efe

Please sign in to comment.