Makefile 737 Bytes
Newer Older
Cedric Roux's avatar
Cedric Roux committed
1
CC=gcc
Cedric Roux's avatar
Cedric Roux committed
2
CFLAGS=-Wall -g
Cedric Roux's avatar
Cedric Roux committed
3 4 5 6

GENIDS=genids
GENIDS_OBJS=genids.o

Cedric Roux's avatar
Cedric Roux committed
7
all : $(GENIDS) T_messages.txt.h T_IDs.h
Cedric Roux's avatar
Cedric Roux committed
8 9 10 11 12 13 14

$(GENIDS): $(GENIDS_OBJS)
	$(CC) $(CFLAGS) -o $(GENIDS) $(GENIDS_OBJS)

%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $<

15
T_messages.txt.h: T_messages.txt
Cedric Roux's avatar
Cedric Roux committed
16
	xxd -i T_messages.txt T_messages.txt.h
17

Cedric Roux's avatar
Cedric Roux committed
18 19 20
T_IDs.h: $(GENIDS) T_messages.txt
	./$(GENIDS) T_messages.txt T_IDs.h

21
check_vcd:
Thomas Laurent's avatar
Thomas Laurent committed
22
	gcc -Wall -I. -I.. -I../itti -I../../../openair2/COMMON -Itracer -o _check_vcd check_vcd.c tracer/database.c tracer/utils.c -lm -pthread
23 24 25 26 27
	./_check_vcd || (rm -f ./_check_vcd ./T_IDs.h ./T_messages.txt.h && false)
	rm -f ./_check_vcd

.PHONY: check_vcd

Cedric Roux's avatar
Cedric Roux committed
28
clean:
29
	rm -f *.o $(GENIDS) core T_IDs.h T_messages.txt.h _check_vcd
30 31

cleanall: clean
32
	cd tracer && $(MAKE) clean