-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (47 loc) · 1.85 KB
/
Makefile
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
56
57
58
59
60
61
62
############################################################################
# Filename: Makefile
#
# Description: This file is used to compile the packet generator
#
############################################################################
BASE_DIR=$(PWD)
CC=gcc
CFLAGS=-Wall
INCLUDE_DIR=$(BASE_DIR)/include
OBJ_DIR=$(BASE_DIR)/obj
SRC_DIR=$(BASE_DIR)/src
BIN_DIR=$(BASE_DIR)/bin
CFLAGS+=-I$(INCLUDE_DIR)
DEPS= \
$(INCLUDE_DIR)/lisp_hdrs.h \
$(INCLUDE_DIR)/lisp_defn.h \
$(INCLUDE_DIR)/lisp_tdfs.h
OBJ_FILES=$(OBJ_DIR)/lisp_main.o \
$(OBJ_DIR)/lisp_util.o \
$(OBJ_DIR)/lisp_itr.o \
$(OBJ_DIR)/lisp_etr.o
EXE_NAME=xTR
LD=-lpthread
EXE_NAME_MSMR=MSMR
OBJ_FILES_MSMR=$(OBJ_DIR)/lisp_msmr.o
exe: $(OBJ_FILES) $(OBJ_FILES_MSMR)
@$(CC) $(CFLAGS) -o $(BIN_DIR)/$(EXE_NAME) $(OBJ_FILES) $(LD)
@$(CC) $(CFLAGS) -o $(BIN_DIR)/$(EXE_NAME_MSMR) $(OBJ_FILES_MSMR) $(LD)
xtr: $(OBJ_FILES)
@$(CC) $(CFLAGS) -o $(BIN_DIR)/$(EXE_NAME) $(OBJ_FILES) $(LD)
msmr: $(OBJ_FILES_MSMR)
@$(CC) $(CFLAGS) -o $(BIN_DIR)/$(EXE_NAME_MSMR) $(OBJ_FILES_MSMR) $(LD)
$(OBJ_DIR)/lisp_main.o: $(SRC_DIR)/lisp_main.c $(DEPS)
@$(CC) $(CFLAGS) -c -o $(OBJ_DIR)/lisp_main.o $(SRC_DIR)/lisp_main.c $(INCLUDES)
$(OBJ_DIR)/lisp_util.o: $(SRC_DIR)/lisp_util.c $(DEPS)
@$(CC) $(CFLAGS) -c -o $(OBJ_DIR)/lisp_util.o $(SRC_DIR)/lisp_util.c $(INCLUDES)
$(OBJ_DIR)/lisp_itr.o: $(SRC_DIR)/lisp_itr.c $(DEPS)
@$(CC) $(CFLAGS) -c -o $(OBJ_DIR)/lisp_itr.o $(SRC_DIR)/lisp_itr.c $(INCLUDES)
$(OBJ_DIR)/lisp_etr.o: $(SRC_DIR)/lisp_etr.c $(DEPS)
@$(CC) $(CFLAGS) -c -o $(OBJ_DIR)/lisp_etr.o $(SRC_DIR)/lisp_etr.c $(INCLUDES)
$(OBJ_DIR)/lisp_msmr.o: $(SRC_DIR)/lisp_msmr.c $(DEPS)
@$(CC) $(CFLAGS) -c -o $(OBJ_DIR)/lisp_msmr.o $(SRC_DIR)/lisp_msmr.c $(INCLUDES)
clean:
@rm -rf $(OBJ_DIR)/*.o
@rm -rf $(BIN_DIR)/$(EXE_NAME)
@rm -rf $(BIN_DIR)/$(EXE_NAME_MSMR)