Makefile (10428:0caf62b57dfd) | Makefile (12266:63b8da9eeca4) |
---|---|
1# Copyright (c) 2012-2014, TU Delft 2# Copyright (c) 2012-2014, TU Eindhoven 3# Copyright (c) 2012-2014, TU Kaiserslautern 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: --- 38 unchanged lines hidden (view full) --- 47DBGCXXFLAGS ?= -g ${GCOVFLAGS} 48 49# Common warning flags shared by both C and C++. 50WARNFLAGS := -W -pedantic-errors -Wextra -Werror \ 51 -Wformat -Wformat-nonliteral -Wpointer-arith \ 52 -Wcast-align -Wconversion -Wall -Werror 53 54# Sum up the flags. | 1# Copyright (c) 2012-2014, TU Delft 2# Copyright (c) 2012-2014, TU Eindhoven 3# Copyright (c) 2012-2014, TU Kaiserslautern 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: --- 38 unchanged lines hidden (view full) --- 47DBGCXXFLAGS ?= -g ${GCOVFLAGS} 48 49# Common warning flags shared by both C and C++. 50WARNFLAGS := -W -pedantic-errors -Wextra -Werror \ 51 -Wformat -Wformat-nonliteral -Wpointer-arith \ 52 -Wcast-align -Wconversion -Wall -Werror 53 54# Sum up the flags. |
55CXXFLAGS := -O ${WARNFLAGS} ${DBGCXXFLAGS} ${OPTCXXFLAGS} -std=c++98 | 55CXXFLAGS := -O ${WARNFLAGS} ${DBGCXXFLAGS} ${OPTCXXFLAGS} -std=c++0x |
56 57DRAMPOWER_PATH ?= ../.. 58MYPATH := ${DRAMPOWER_PATH}/test/libdrampowertest 59USE_XERCES ?= 1 60 61# Name of the generated binary. 62BINARY := ${MYPATH}/library_test | 56 57DRAMPOWER_PATH ?= ../.. 58MYPATH := ${DRAMPOWER_PATH}/test/libdrampowertest 59USE_XERCES ?= 1 60 61# Name of the generated binary. 62BINARY := ${MYPATH}/library_test |
63BINARY2 := ${MYPATH}/window_example |
|
63 64ifeq ($(USE_XERCES),1) 65 LIBS := -lxerces-c -ldrampowerxml -ldrampower 66else 67 LIBS := -ldrampower 68endif 69 70all: 71 g++ ${MYPATH}/lib_test.cc ${CXXFLAGS} -iquote ${DRAMPOWER_PATH}/src -DUSE_XERCES=${USE_XERCES} -L${DRAMPOWER_PATH}/src/ ${LIBS} -o $(BINARY) | 64 65ifeq ($(USE_XERCES),1) 66 LIBS := -lxerces-c -ldrampowerxml -ldrampower 67else 68 LIBS := -ldrampower 69endif 70 71all: 72 g++ ${MYPATH}/lib_test.cc ${CXXFLAGS} -iquote ${DRAMPOWER_PATH}/src -DUSE_XERCES=${USE_XERCES} -L${DRAMPOWER_PATH}/src/ ${LIBS} -o $(BINARY) |
73 g++ ${MYPATH}/window_example.cc ${CXXFLAGS} -iquote ${DRAMPOWER_PATH}/src -DUSE_XERCES=${USE_XERCES} -L${DRAMPOWER_PATH}/src/ ${LIBS} -o $(BINARY2) |
|
72 73clean: 74 rm -f $(BINARY) | 74 75clean: 76 rm -f $(BINARY) |
77 rm -f $(BINARY2) |
|
75 76coverageclean: 77 $(RM) lib_test.gcno lib_test.gcda 78 79test: all | 78 79coverageclean: 80 $(RM) lib_test.gcno lib_test.gcda 81 82test: all |
80 ./$(BINARY) ${DRAMPOWER_PATH}/memspecs/MICRON_1Gb_DDR2-1066_16bit_H.xml | 83 ./$(BINARY) ${DRAMPOWER_PATH}/memspecs/MICRON_1Gb_DDR2-1066_16bit_H.xml 84 ./$(BINARY2) ${DRAMPOWER_PATH}/memspecs/MICRON_1Gb_DDR2-1066_16bit_H.xml |
81 82.PHONY: clean test | 85 86.PHONY: clean test |