hop-2012/Makefile

39 lines
932 B
Makefile
Raw Normal View History

2010-12-27 21:56:42 +00:00
TARGET = cmsg
2011-01-02 22:56:11 +00:00
OBJECTS = main.o harness.o net.o util.o relay.o hashtable.o dataq.o sexp.o sexpio.o node.o \
2011-01-03 03:46:48 +00:00
queue.o direct.o fanout.o subscription.o meta.o
2010-12-27 21:56:42 +00:00
2011-01-02 02:30:03 +00:00
UUID_CFLAGS:=$(shell uuid-config --cflags)
UUID_LDFLAGS:=$(shell uuid-config --ldflags)
# grr
ifeq ($(shell uname -s),Darwin)
UUID_LIB=uuid
else
UUID_LIB=ossp-uuid
endif
2011-01-02 17:27:17 +00:00
#CFLAGS = -D_XOPEN_SOURCE=600 -Wall -O0 -g $(UUID_CFLAGS)
CFLAGS = -D_XOPEN_SOURCE=600 -Wall -O3 $(UUID_CFLAGS)
2011-01-02 02:30:03 +00:00
#CFLAGS = -D_XOPEN_SOURCE=600 -Wall -O3 -static $(UUID_CFLAGS)
2010-12-27 21:56:42 +00:00
all: $(TARGET)
$(TARGET): $(OBJECTS)
2011-01-02 02:30:03 +00:00
$(CC) $(CFLAGS) $(UUID_LDFLAGS) -o $@ $(OBJECTS) -l$(UUID_LIB) -levent
# $(CC) $(CFLAGS) $(UUID_LDFLAGS) -o $@ $(OBJECTS) -l$(UUID_LIB) -levent -lrt
2010-12-27 21:56:42 +00:00
%.o: %.c
$(CC) $(CFLAGS) -c $<
clean:
rm -f $(TARGET)
rm -f $(OBJECTS)
rm -rf *.dSYM
rm -f depend.mk
2011-01-02 19:53:43 +00:00
rm -f test1 test1.o test3 test3.o
depend.mk:
gcc $(CFLAGS) -M *.c > $@
echo "depend.mk:" Makefile *.c >> $@
-include depend.mk