sourcehook/test/Makefile
author Scott Ehlert <ds@alliedmods.net>
Tue Sep 16 04:41:32 2008 -0500 (2008-09-16)
changeset 533 591b88a78e35
parent 523 6f1630519b81
permissions -rw-r--r--
Fixed tags for mmsource-central

mmsource-1.00-RC1 - Not tagged originally, but eventually done by Scott Ehlert <[email protected]> on Wed Jul 19 08:41:34 2006 UTC
mmsource-1.00-RC2 - Not tagged originally, but eventually done by Scott Ehlert <[email protected]> on Wed Jul 19 08:35:20 2006 UTC
mmsource-1.00 - Not tagged originally, but eventually done by Scott Ehlert <[email protected]> on Wed Jul 19 08:30:40 2006 UTC
mmsource-1.1 - Not tagged originally, but eventually done by Scott Ehlert <[email protected]> on Wed Jul 19 08:25:09 2006 UTC
mmsource-1.1.1 - Not tagged originally, but eventually done by Scott Ehlert <[email protected]> on Wed Jul 19 08:22:23 2006 UTC
mmsource-1.1.2 - Not tagged originally, but eventually done by Scott Ehlert <[email protected]> on Wed Jul 19 08:14:00 2006 UTC
mmsource-1.2 - Not tagged originally, but eventually done by Scott Ehlert <[email protected]> on Wed Jul 19 08:10:47 2006 UTC
mmsource-1.2.1 - Not tagged originally, but eventually done by Scott Ehlert <[email protected]> on Wed Jul 19 08:01:35 2006 UTC
mmsource-1.2.2 - Not tagged originally, but eventually done by Scott Ehlert <[email protected]> on Wed Jul 19 07:57:26 2006 UTC
mmsource-1.2.3 - Not tagged originally, but eventually done by David Anderson <[email protected]> on Wed Jul 12 17:33:59 2006 UTC
mmsource-1.3 - Originally tagged by Scott Ehlert <[email protected]> on Thu Aug 17 03:19:55 2006 UTC
mmsource-1.3a - Originally tagged by Scott Ehlert <[email protected]> on Wed Sep 6 07:17:37 2006 UTC
mmsource-1.3d - Originally tagged by Scott Ehlert <[email protected]> on Fri Feb 2 05:30:56 2007 UTC
mmsource-1.4 - Originally tagged by Scott Ehlert <[email protected]> on Sat Apr 7 05:00:28 2007 UTC
mmsource-1.6.0 - Originally tagged by David Anderson <[email protected]> on Mon Feb 18 23:31:29 2008 UTC
mmsource-1.6.1 - Originally tagged by David Anderson <[email protected]> on Mon Feb 25 17:15:44 2008 UTC
mmsource-1.6.2 - Originally tagged by David Anderson <[email protected]> on Sat Jul 26 05:04:35 2008 UTC
     1 #(C)2004-2008 SourceMM Development Team
     2 # Makefile written by David "BAILOPAN" Anderson and Pavol Marko
     3 
     4 OPT_FLAGS = -O3 -funroll-loops -s -pipe
     5 DEBUG_FLAGS = -g -ggdb3
     6 CPP = gcc
     7 LINK = -lstdc++
     8 INCLUDE = -I. -I..
     9 MAX_PARAMS=20
    10 
    11 BINARY = sourcehook_test
    12 OBJECTS = main.cpp sourcehook.cpp ../sourcehook_hookmangen.cpp $(shell ls -t test*.cpp)
    13 HEADERS = ../sh_list.h ../sh_tinyhash.h ../sh_memory.h ../sh_string.h ../sh_vector.h ../sourcehook_impl.h ../FastDelegate.h ../sourcehook.h ../sh_memfuncinfo.h
    14 
    15 ifeq "$(DEBUG)" "true"
    16 	BIN_DIR = Debug
    17 	CFLAGS = $(DEBUG_FLAGS)
    18 else
    19 	BIN_DIR = Release
    20 	CFLAGS = $(OPT_FLAGS)
    21 endif
    22 
    23 CFLAGS += -Wall -Wno-non-virtual-dtor
    24 # Also, enable SH_ASSERT
    25 CFLAGS += -DSH_DEBUG
    26 
    27 OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
    28 	
    29 
    30 default: all
    31 
    32 $(BIN_DIR)/%.o: %.cpp $(HEADERS)
    33 	$(CPP) $(INCLUDE) $(CFLAGS) -o $@ -c $<
    34 
    35 ../sourcehook.h: ../generate/sourcehook.hxx
    36 	(cd ../generate; ./shworker.bin iter sourcehook.hxx sourcehook.h $(MAX_PARAMS); cp sourcehook.h ..)
    37 
    38 ../sourcehook.hxx: ../generate/sh_memfuncinfo.hxx
    39 	(cd ../generate; ./shworker.bin iter sh_memfuncinfo.hxx sh_memfuncinfo.h $(MAX_PARAMS); cp sh_memfuncino.h ..)
    40 
    41 ../FastDelegate.hxx: ../generate/FastDelegate.hxx
    42 	(cd ../generate; ./shworker.bin iter FastDelegate.hxx FastDelegate.h $(MAX_PARAMS); cp FastDelegate.h ..)
    43 	
    44 debug:
    45 	$(MAKE) all DEBUG=true
    46 	
    47 all:
    48 	mkdir -p $(BIN_DIR)
    49 	ln -sf ../sourcehook.cpp sourcehook.cpp
    50 	$(MAKE) $(BINARY)
    51 	rm -f $(BINARY)
    52 	rm -f sourcehook.cpp
    53 	ln -sf $(BIN_DIR)/$(BINARY) $(BINARY)
    54 
    55 
    56 $(BINARY): $(OBJ_LINUX)
    57 	$(CPP) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINK) -o$(BIN_DIR)/$(BINARY)
    58 
    59 clean:
    60 	rm -rf Release/*.o
    61 	rm -rf Release/$(BINARY)
    62 	rm -rf Debug/*.o
    63 	rm -rf Debug/$(BINARY)