Makefile

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
CC= g++
CCFLAGS= -std=c++11

SOURCES= example1_pointer_type_conversion.cpp\
		 example2_conversion_pointer_to_integer.cpp\
		 example3_unsafe_type_pruning.cpp\
		 example4_custom_hash_function.cpp
OBJECTS= $(SOURCES:.cpp=.o)
EXEC= $(SOURCES:.cpp=.x)
all: $(EXEC)

%.x: %.cpp
	$(CC) $(CCFLAGS) -o $@ $<

clean:
	rm -rf *.o *.x
Back to reinterpret_cast