123456789101112131415161718192021222324252627282930 |
- CC = g++
- # sana: explanations about CFLAGS values
- # -Llib/ ==> gcc searches for pngwriter library into lib/ directory
- # -I lib/ and /usr/include/freetype2/ ==> gcc searches for needed headers into those directories
- CFLAGS = -Wall -ltemelia -lm -O2
- # Test sources folder
- SRCDIR = src
- # Object files
- OBJS = $(shell ls $(SRCDIR)/*.cpp|tr '\n' ' '|sed -n -e s/\\.cpp/.o/gp)
- PERFORMANCE_BIN = temelia_performance
- # build an executable capable of hard testing data structures
- all: $(PERFORMANCE_BIN)
- # build the performance tests, must have built the objects first
- $(PERFORMANCE_BIN): $(OBJS)
- $(CC) $(OBJS) $(CFLAGS) -o $(PERFORMANCE_BIN)
- # given an object ($@) that has a corresponding C source ($<), build it
- .cpp.o:
- $(CC) $(CFLAGS) -c "$<" -o "$@"
-
- .PHONY: clean
- clean:
- -rm $(PERFORMANCE_BIN) $(OBJS)
|