Sanchayan Maity
2fcc51c2c1
While at it also add the libpthread static library amd m5op_x86 for matrix multiplication test code as well. Note that the splash2 benchmark code does not comply with gem5 coding guidelines. Academic guys never seem to follow 80 columns and no whitespace guideline :(.
34 lines
802 B
Text
34 lines
802 B
Text
CC := gcc
|
|
CFLAGS := -static -O3 -pthread -D_POSIX_C_SOURCE=200112
|
|
#CFLAGS := -g3 -pthread -D_POSIX_C_SOURCE=200112
|
|
CFLAGS := $(CFLAGS) -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wdisabled-optimization
|
|
CFLAGS := $(CFLAGS) -Wpadded -Winline -Wpointer-arith -Wsign-compare -Wendif-labels
|
|
LDFLAGS := -lm libpthread.a m5op_x86.o
|
|
|
|
BASEDIR := $(HOME)/GitSource/gem5/splash2/codes
|
|
MACROS := $(BASEDIR)/null_macros/c.m4.null.POSIX_BARRIER
|
|
M4 := m4 -s -Ulen -Uindex
|
|
|
|
x = *
|
|
|
|
$(TARGET): $(OBJS)
|
|
$(CC) $(OBJS) $(CFLAGS) -o $(TARGET) $(LDFLAGS)
|
|
|
|
clean:
|
|
rm -rf *.c *.h *.o $(TARGET)
|
|
|
|
.SUFFIXES:
|
|
.SUFFIXES: .o .c .C .h .H
|
|
|
|
.H.h:
|
|
$(M4) $(MACROS) $*.H > $*.h
|
|
|
|
.C.c:
|
|
$(M4) $(MACROS) $*.C > $*.c
|
|
|
|
.c.o:
|
|
$(CC) -c $(CFLAGS) $*.c
|
|
|
|
.C.o:
|
|
$(M4) $(MACROS) $*.C > $*.c
|
|
$(CC) -c $(CFLAGS) $*.c
|