Initial commit.
[hondza-y36pr2.git] / fadvise / Makefile
blob306a00a3e2455db8bf1741d744517d0ae98fa997
2 CC=gcc
3 RM=rm -f
4 CFLAGS_COMMON=-Wall -pedantic -ansi
5 CFLAGS_OPTI=-O3 -fomit-frame-pointer -ffast-math -DNDEBUG
6 CFLAGS_DEBUG=-ggdb3
7 ifeq "$(ARG)" "opti"
8 export CFLAGS=$(CFLAGS_COMMON) $(CFLAGS_OPTI)
9 else
10 export CFLAGS=$(CFLAGS_COMMON) $(CFLAGS_DEBUG)
11 endif
13 NAME=libfadvise.so
15 LIBS=-ldl
16 OBJS=fadvise.o
19 $(NAME): $(OBJS) $(LIBS)
20 $(CC) -fPIC -shared $(CFLAGS) -o $@ $^
21 ifeq "$(ARG)" "opti"
22 strip --strip-debug $(NAME)
23 endif
26 %.o: %.c %.h
27 $(CC) -c -fPIC -shared $(CFLAGS) -o $@ $<
30 clean:
31 $(RM) *.o $(NAME) core