-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTupfile
More file actions
17 lines (16 loc) · 689 Bytes
/
Tupfile
File metadata and controls
17 lines (16 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
CFLAGS += -Wall -Wextra -fPIC -pedantic -ggdb3 -std=c99
CFLAGS += `pkg-config --cflags-only-other MagickWand`
LDLIBS += `pkg-config --libs MagickWand`
CPPFLAGS += -I./include
CPPFLAGS += `pkg-config --cflags-only-I MagickWand`
ifeq ($(CC),gcc)
CFLAGS += -ggdb3
endif
ifeq ($(CC),clang)
CFLAGS += -Qunused-arguments -ggdb -Weverything
endif
: foreach src/*.c |> gcc $(CFLAGS) $(CPPFLAGS) -c %f -o %o |> obj/%B.o {objs}
: {objs} |> ar crvs %o %f |> libfab.a
: {objs} |> gcc $(CFLAGS) -shared -o %o %f $(LDLIBS) |> libfab.so
: test/fab_tests.c libfab.so |> gcc $(CFLAGS) $(CPPFLAGS) %f -o %o -lfab -lcunit |> libfab-tests
: libfab-tests |> env LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ./%f |>