aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/handler/Makefile
blob: b28cc9081fe37d523f652e553b7112ba2f49cc82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
CXX=g++
CC=gcc

CXXFLAGS=-gstabs -I../../.. -Wall -D_REENTRANT
LDFLAGS=-lpthread

OBJ_DIR=.
BIN_DIR=.

THREAD_SRC=linux_thread.cc
SHARE_SRC=../../minidump_file_writer.cc\
	  ../../../common/string_conversion.cc\
	  ../../../common/linux/file_id.cc\
	  minidump_generator.cc
HANDLER_SRC=exception_handler.cc\
	    ../../../common/linux/guid_creator.cc
SHARE_C_SRC=../../../common/convert_UTF.c

THREAD_TEST_SRC=linux_thread_test.cc
MINIDUMP_TEST_SRC=minidump_test.cc
EXCEPTION_TEST_SRC=exception_handler_test.cc

THREAD_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o,$(THREAD_SRC))
SHARE_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o,$(SHARE_SRC))
HANDLER_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o,$(HANDLER_SRC))
SHARE_C_OBJ=$(patsubst %.c,$(OBJ_DIR)/%.o,$(SHARE_C_SRC)) md5.o
THREAD_TEST_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o, $(THREAD_TEST_SRC))\
		$(THREAD_OBJ)
MINIDUMP_TEST_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o, $(MINIDUMP_TEST_SRC))\
		  $(THREAD_OBJ) $(SHARE_OBJ) $(SHARE_C_OBJ)
EXCEPTION_TEST_OBJ=$(patsubst %.cc,$(OBJ_DIR)/%.o, $(EXCEPTION_TEST_SRC))\
		   $(THREAD_OBJ) $(SHARE_OBJ) $(SHARE_C_OBJ) $(HANDLER_SRC)

BIN=$(BIN_DIR)/minidump_test\
    $(BIN_DIR)/linux_thread_test\
    $(BIN_DIR)/exception_handler_test

.PHONY:all clean

all:$(BIN)

$(BIN_DIR)/linux_thread_test:$(THREAD_TEST_OBJ)
	$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@

$(BIN_DIR)/minidump_test:$(MINIDUMP_TEST_OBJ)
	$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@

$(BIN_DIR)/exception_handler_test:$(EXCEPTION_TEST_OBJ)
	$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@

md5.o:../../../common/linux/md5.c
	$(CC) $(CXXFLAGS) -c $^

clean:
	rm -f $(BIN) *.o *.dmp