445a812932a43af4f1231a9eb542dec562aa03f7
[melted] / src / miracle / Makefile
1 TARGET = miracle
2
3 APP_OBJS = miracle.o
4
5 LIB_OBJS = miracle_log.o \
6 miracle_server.o \
7 miracle_connection.o \
8 miracle_local.o \
9 miracle_unit.o \
10 miracle_commands.o \
11 miracle_unit_commands.o
12
13 OBJS = $(APP_OBJS) $(LIB_OBJS)
14
15 CFLAGS = -O3 -I .. -Wall -g -D_FILE_OFFSET_BITS=64 -pthread -rdynamic
16
17 LDFLAGS = -L ../valerie -lvalerie -L ../framework -lmlt
18
19 ifeq ($(MLT_GPROF),true)
20 CFLAGS+=-p
21 LDFLAGS+=-p
22 endif
23
24 SRCS := $(OBJS:.o=.c)
25
26 all: $(TARGET)
27
28 $(TARGET): $(APP_OBJS) libmiracle.so
29 $(CC) -o $@ $(APP_OBJS) -L. -lmiracle $(LDFLAGS)
30
31 libmiracle.so: $(LIB_OBJS)
32 $(CC) -shared -o $@ $(LIB_OBJS) $(LDFLAGS)
33
34 depend: $(SRCS)
35 $(CC) -MM $(CFLAGS) $^ 1>.depend
36
37 dist-clean: clean
38 rm -f .depend
39
40 clean:
41 rm -f $(OBJS) $(TARGET) libmiracle.so
42
43 ifneq ($(wildcard .depend),)
44 include .depend
45 endif