Makefile 2.43 KB
Newer Older
1 2
# multicat Makefile

Christophe Massiot's avatar
Christophe Massiot committed
3
VERSION = 2.3
4
CFLAGS += -Wall -Wformat-security -O3 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -D_ISOC99_SOURCE -D_BSD_SOURCE -D_DEFAULT_SOURCE
5
CFLAGS += -g
6
# Comment out the following line for Mac OS X build
7
LDLIBS += -lrt -pthread
8 9 10 11

OBJ_MULTICAT = multicat.o util.o
OBJ_INGESTS = ingests.o util.o
OBJ_AGGREGARTP = aggregartp.o util.o
12
OBJ_REORDERTP = reordertp.o util.o
13
OBJ_OFFSETS = offsets.o util.o
14
OBJ_LASTS = lasts.o
15
OBJ_MULTICAT_VALIDATE = multicat_validate.o util.o
16
OBJ_MULTILIVE = multilive.o util.o
17

18 19 20
PREFIX ?= /usr/local
BIN = $(DESTDIR)/$(PREFIX)/bin
MAN = $(DESTDIR)/$(PREFIX)/share/man/man1
21

22
all: multicat ingests aggregartp reordertp offsets lasts multicat_validate multilive
23 24 25 26

$(OBJ_MULTICAT): Makefile util.h
$(OBJ_INGESTS): Makefile util.h
$(OBJ_AGGREGARTP): Makefile util.h
27
$(OBJ_REORDERTP): Makefile util.h
28
$(OBJ_OFFSETS): Makefile util.h
29
$(OBJ_LASTS): Makefile
30
$(OBJ_MULTICAT_VALIDATE): Makefile util.h
31
$(OBJ_MULTILIVE): Makefile util.h
32 33

multicat: $(OBJ_MULTICAT)
34
	$(CC) $(LDFLAGS) -o $@ $(OBJ_MULTICAT) $(LDLIBS)
35 36

ingests: $(OBJ_INGESTS)
37
	$(CC) $(LDFLAGS) -o $@ $(OBJ_INGESTS) $(LDLIBS)
38 39

aggregartp: $(OBJ_AGGREGARTP)
40
	$(CC) $(LDFLAGS) -o $@ $(OBJ_AGGREGARTP) $(LDLIBS)
41

42
reordertp: $(OBJ_REORDERTP)
43
	$(CC) $(LDFLAGS) -o $@ $(OBJ_REORDERTP) $(LDLIBS)
44 45

offsets: $(OBJ_OFFSETS)
46
	$(CC) $(LDFLAGS) -o $@ $(OBJ_OFFSETS) $(LDLIBS)
47

48
lasts: $(OBJ_LASTS)
49
	$(CC) $(LDFLAGS) -o $@ $(OBJ_LASTS) $(LDLIBS)
50

51
multicat_validate: $(OBJ_MULTICAT_VALIDATE)
52
	$(CC) $(LDFLAGS) -o $@ $(OBJ_MULTICAT_VALIDATE) $(LDLIBS)
53

54
multilive: $(OBJ_MULTILIVE)
55
	$(CC) $(LDFLAGS) -o $@ $(OBJ_MULTILIVE) $(LDLIBS)
56

57
clean:
58
	-rm -f multicat $(OBJ_MULTICAT) ingests $(OBJ_INGESTS) aggregartp $(OBJ_AGGREGARTP) reordertp $(OBJ_REORDERTP) offsets $(OBJ_OFFSETS) lasts $(OBJ_LASTS) multicat_validate $(OBJ_MULTICAT_VALIDATE) multilive $(OBJ_MULTILIVE)
59 60 61

install: all
	@install -d $(BIN)
62
	@install -d $(MAN)
63
	@install multicat ingests aggregartp reordertp offsets lasts multicat_validate multilive $(BIN)
64
	@install multicat.1 ingests.1 aggregartp.1 reordertp.1 offsets.1 lasts.1 $(MAN)
65 66

uninstall:
67
	@rm $(BIN)/multicat $(BIN)/ingests $(BIN)/aggregartp $(BIN)/reordertp $(BIN)/offsets $(BIN)/lasts $(BIN)/multicat_validate $(BIN)/multilive
68
	@rm $(MAN)/multicat.1 $(MAN)/ingests.1 $(MAN)/aggregartp.1 $(MAN)/reordertp.1 $(MAN)/offsets.1 $(MAN)/lasts.1
69 70

dist:
71
	git archive --format=tar --prefix=multicat-$(VERSION)/ master | bzip2 -9 > multicat-$(VERSION).tar.bz2
72 73
	ls -l multicat-$(VERSION).tar.bz2