2005-09-24 15:56:40 +00:00
|
|
|
#(C)2004-2005 SourceMM Development Team
|
|
|
|
# Makefile written by David "BAILOPAN" Anderson
|
2005-05-01 12:36:48 +00:00
|
|
|
|
2005-09-24 15:56:40 +00:00
|
|
|
OPT_FLAGS = -O3 -funroll-loops -s -pipe
|
|
|
|
DEBUG_FLAGS = -g -ggdb3
|
|
|
|
CPP = gcc
|
|
|
|
BINARY = sourcehook_test
|
2005-05-01 12:36:48 +00:00
|
|
|
|
2005-09-24 15:56:40 +00:00
|
|
|
OBJECTS = test1.cpp test2.cpp test3.cpp test4.cpp testbail.cpp testbail2.cpp testlist.cpp main.cpp sourcehook.cpp
|
2005-05-01 12:36:48 +00:00
|
|
|
|
2005-09-24 15:56:40 +00:00
|
|
|
LINK = -lstdc++
|
2005-05-05 13:13:16 +00:00
|
|
|
|
2005-09-24 15:56:40 +00:00
|
|
|
INCLUDE = -I. -I..
|
2005-05-05 13:13:16 +00:00
|
|
|
|
2005-09-24 15:56:40 +00:00
|
|
|
ifeq "$(DEBUG)" "true"
|
|
|
|
BIN_DIR = Debug
|
|
|
|
CFLAGS = $(DEBUG_FLAGS)
|
|
|
|
else
|
|
|
|
BIN_DIR = Release
|
|
|
|
CFLAGS = $(OPT_FLAGS)
|
|
|
|
endif
|
2005-05-01 12:36:48 +00:00
|
|
|
|
2005-09-24 15:56:40 +00:00
|
|
|
# CFLAGS +=
|
2005-05-05 13:13:16 +00:00
|
|
|
|
2005-09-24 15:56:40 +00:00
|
|
|
OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
|
2005-05-05 14:00:08 +00:00
|
|
|
|
2005-09-24 15:56:40 +00:00
|
|
|
$(BIN_DIR)/%.o: %.cpp
|
|
|
|
$(CPP) $(INCLUDE) $(CFLAGS) -o $@ -c $<
|
2005-05-01 12:36:48 +00:00
|
|
|
|
2005-09-24 15:56:40 +00:00
|
|
|
all:
|
|
|
|
mkdir -p $(BIN_DIR)
|
|
|
|
ln -sf ../sourcehook.cpp sourcehook.cpp
|
|
|
|
$(MAKE) sourcehook_test
|
|
|
|
rm -f $(BINARY)
|
|
|
|
ln -sf $(BIN_DIR)/$(BINARY) $(BINARY)
|
|
|
|
|
|
|
|
sourcehook_test: $(OBJ_LINUX)
|
|
|
|
$(CPP) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINK) -o$(BIN_DIR)/$(BINARY)
|
|
|
|
|
|
|
|
debug:
|
|
|
|
$(MAKE) all DEBUG=true
|
|
|
|
|
|
|
|
default: all
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf Release/*.o
|
|
|
|
rm -rf Release/$(BINARY)
|
|
|
|
rm -rf Debug/*.o
|
|
|
|
rm -rf Debug/$(BINARY)
|