Files
i2p.itoopie/apps/sam/c/examples/i2p-ping/Makefile

54 lines
979 B
Makefile
Raw Normal View History

FLAGS+=-g
2004-08-01 02:38:14 +00:00
CFLAGS = $(FLAGS) -pipe -std=c99 -Wall
CFLAGS += -I../../inc
LDFLAGS = $(FLAGS) -L../../lib -lsam
2004-08-01 02:38:14 +00:00
OBJS:=i2p-ping.lo
DEPS:=$(patsubst obj/%.lo, .deps/%.d, $(OBJS))
DESTDIR:=$(if $(DESTDIR),$(DESTDIR)/lib,/usr/lib)
2004-08-01 02:38:14 +00:00
MAKEFLAGS=-s -r
PERL=$(shell which perl 2>/dev/null)
ifneq ($(PERL),)
STATUS=$(PERL) ../../status
else
STATUS=echo
endif
2004-08-01 02:38:14 +00:00
LIBTOOL_LOG=libtool.log
2004-08-01 02:38:14 +00:00
all:: cleanlog i2p-ping
2004-08-01 02:38:14 +00:00
cleanlog:
>$(LIBTOOL_LOG)
2004-08-01 02:38:14 +00:00
i2p-ping: $(OBJS)
$(STATUS) link
libtool --mode=link gcc $(LDFLAGS) -o $@ $^ >>$(LIBTOOL_LOG)
2004-08-01 02:38:14 +00:00
%.lo: %.c
$(STATUS) compile $*
libtool --mode=compile gcc $(CFLAGS) -Iinc/ -c -o $@ $< >>$(LIBTOOL_LOG)
.deps/%.d: src/%.c
$(STATUS) deps $*
gcc -Iinc/ -MM -MT obj/$*.o $^ -o $@
2004-08-01 02:38:14 +00:00
clean:
$(STATUS) clean
rm -Rf .deps obj libtool.log
libtool --mode=clean rm -f i2p-ping i2p-ping.lo >>$(LIBTOOL_LOG)
$(OBJS):|obj
obj:
$(STATUS) MKDIR $@
mkdir -p $@
-include $(DEPS)
$(DEPS):|.deps
.deps:
$(STATUS) MKDIR $@
mkdir -p $@
.PHONY: all cleanlog clean