Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework makefiles to allow selection of CC/CXX #68

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ no_opencl_support:
@echo "Warning: gpgpu-sim is building without opencl support. Make sure NVOPENCL_LIBDIR and NVOPENCL_INCDIR are set"

$(SIM_LIB_DIR)/libcudart.so: makedirs $(LIBS) cudalib
g++ -shared -Wl,-soname,libcudart_$(GPGPUSIM_BUILD).so -Wl,--version-script=linux-so-version.txt\
$(CXX) $(LDFLAGS) -shared -Wl,-soname,libcudart_$(GPGPUSIM_BUILD).so -Wl,--version-script=linux-so-version.txt \
$(SIM_OBJ_FILES_DIR)/libcuda/*.o \
$(SIM_OBJ_FILES_DIR)/cuda-sim/*.o \
$(SIM_OBJ_FILES_DIR)/cuda-sim/decuda_pred_table/*.o \
Expand All @@ -165,7 +165,7 @@ $(SIM_LIB_DIR)/libcudart.so: makedirs $(LIBS) cudalib
if [ ! -f $(SIM_LIB_DIR)/libcudart.so.9.1 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.9.1; fi

$(SIM_LIB_DIR)/libcudart.dylib: makedirs $(LIBS) cudalib
g++ -dynamiclib -Wl,-headerpad_max_install_names,-undefined,dynamic_lookup,-compatibility_version,1.1,-current_version,1.1\
$(CXX) -dynamiclib -Wl,-headerpad_max_install_names,-undefined,dynamic_lookup,-compatibility_version,1.1,-current_version,1.1\
$(SIM_OBJ_FILES_DIR)/libcuda/*.o \
$(SIM_OBJ_FILES_DIR)/cuda-sim/*.o \
$(SIM_OBJ_FILES_DIR)/cuda-sim/decuda_pred_table/*.o \
Expand All @@ -176,7 +176,7 @@ $(SIM_LIB_DIR)/libcudart.dylib: makedirs $(LIBS) cudalib
-o $(SIM_LIB_DIR)/libcudart.dylib

$(SIM_LIB_DIR)/libOpenCL.so: makedirs $(LIBS) opencllib
g++ -shared -Wl,-soname,libOpenCL_$(GPGPUSIM_BUILD).so \
$(CXX) -shared -Wl,-soname,libOpenCL_$(GPGPUSIM_BUILD).so \
$(SIM_OBJ_FILES_DIR)/libopencl/*.o \
$(SIM_OBJ_FILES_DIR)/cuda-sim/*.o \
$(SIM_OBJ_FILES_DIR)/cuda-sim/decuda_pred_table/*.o \
Expand Down
29 changes: 13 additions & 16 deletions cuobjdump_to_ptxplus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ LEX = flex
LEXFLAGS = -B
YACC = bison
YFLAGS = -t -d --report=all --verbose
CCFLAGS = -ggdb -fPIC -Wall -Wno-unused-function -Wno-sign-compare
CXX = g++
CXXFLAGS = ${CCFLAGS}
LD = g++
LDFLAGS = ${CCFLAGS}
CCFLAGS = -ggdb -fPIC
CXXFLAGS += ${CCFLAGS}
OUTPUT_DIR=$(SIM_OBJ_FILES_DIR)/cuobjdump_to_ptxplus

CXXFLAGS += -I $(OUTPUT_DIR) -I $(OUTPUT_DIR)/../cuda-sim/ -I . -I ../src/cuda-sim/
Expand All @@ -24,22 +21,22 @@ MAKEFLAGS += --no-builtin-rules
.SECONDARY:

$(OUTPUT_DIR)/cuobjdump_to_ptxplus: $(OUTPUT_DIR)/cuobjdumpInst.o $(OUTPUT_DIR)/cuobjdumpInstList.o $(OUTPUT_DIR)/cuobjdump_to_ptxplus.o $(PTX_PARSER_OBJECTS) $(SASS_PARSER_OBJECTS) $(ELF_PARSER_OBJECTS) $(HEADER_PARSER_OBJECTS)
${LD} ${LDFLAGS} -o $@ $(OUTPUT_DIR)/cuobjdumpInst.o $(OUTPUT_DIR)/cuobjdumpInstList.o $(OUTPUT_DIR)/cuobjdump_to_ptxplus.o $(PTX_PARSER_OBJECTS) $(SASS_PARSER_OBJECTS) $(ELF_PARSER_OBJECTS) $(HEADER_PARSER_OBJECTS)
$(CXX) ${LDFLAGS} -o $@ $(OUTPUT_DIR)/cuobjdumpInst.o $(OUTPUT_DIR)/cuobjdumpInstList.o $(OUTPUT_DIR)/cuobjdump_to_ptxplus.o $(PTX_PARSER_OBJECTS) $(SASS_PARSER_OBJECTS) $(ELF_PARSER_OBJECTS) $(HEADER_PARSER_OBJECTS)


$(OUTPUT_DIR)/lex.ptx_.c : ../src/cuda-sim/ptx.l
${LEX} ${LEXFLAGS} -o$(OUTPUT_DIR)/lex.ptx_.c ../src/cuda-sim/ptx.l
$(OUTPUT_DIR)/lex.ptx_.cc : ../src/cuda-sim/ptx.l
${LEX} ${LEXFLAGS} -o$(OUTPUT_DIR)/lex.ptx_.cc ../src/cuda-sim/ptx.l

$(OUTPUT_DIR)/ptx.tab.c : ../src/cuda-sim/ptx.y
${YACC} ${YFLAGS} --name-prefix=ptx_ -v ../src/cuda-sim/ptx.y --file-prefix=$(OUTPUT_DIR)/ptx
$(OUTPUT_DIR)/ptx.tab.cpp : ../src/cuda-sim/ptx.ypp
${YACC} ${YFLAGS} --name-prefix=ptx_ -v ../src/cuda-sim/ptx.ypp --file-prefix=$(OUTPUT_DIR)/ptx

$(OUTPUT_DIR)/ptx.tab.h :$(OUTPUT_DIR)/ptx.tab.c
$(OUTPUT_DIR)/ptx.tab.hpp : $(OUTPUT_DIR)/ptx.tab.cpp

$(OUTPUT_DIR)/lex.ptx_.o : $(OUTPUT_DIR)/lex.ptx_.c $(OUTPUT_DIR)/ptx.tab.h
${CXX} ${CXXFLAGS} -c $(OUTPUT_DIR)/lex.ptx_.c -o $@
$(OUTPUT_DIR)/lex.ptx_.o : $(OUTPUT_DIR)/lex.ptx_.cc $(OUTPUT_DIR)/ptx.tab.hpp
${CXX} ${CXXFLAGS} -c $(OUTPUT_DIR)/lex.ptx_.cc -o $@

$(OUTPUT_DIR)/ptx.tab.o : $(OUTPUT_DIR)/ptx.tab.c ptx_parser.h
${CXX} ${CXXFLAGS} -c $(OUTPUT_DIR)/ptx.tab.c -o $@
$(OUTPUT_DIR)/ptx.tab.o : $(OUTPUT_DIR)/ptx.tab.cpp ptx_parser.h
${CXX} ${CXXFLAGS} -c $(OUTPUT_DIR)/ptx.tab.cpp -o $@

$(OUTPUT_DIR)/%_lexer.cc: %.l $(OUTPUT_DIR)/%_parser.hh
$(LEX) $(LEXFLAGS) -P $*_ -o$@ $<
Expand Down Expand Up @@ -82,7 +79,7 @@ depend:
makedepend -f$(OUTPUT_DIR)/Makefile.makedepend $(SRCS) 2> /dev/null

clean:
rm -f lex.ptx_.c ptx.tab.c ptx.tab.h ptx.output
rm -f lex.ptx_.cc ptx.tab.cc ptx.tab.hpp ptx.output
rm -f elf_lexer.cc elf_parser.cc elf_parser.hh elf_parser.output
rm -f sass_lexer.cc sass_parser.cc sass_parser.hh sass_parser.output
rm -f header_lexer.cc header_parser.cc header_parser.hh header_parser.output
Expand Down
14 changes: 6 additions & 8 deletions libcuda/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,18 @@ ifeq ($(OPENGL_SUPPORT),1)
endif

ifeq ($(GNUC_CPP0X), 1)
CXXFLAGS = -std=c++0x
CXXFLAGS += -std=c++0x
endif


CPP = g++ $(SNOW)
CC = gcc $(SNOW)
CREATELIBRARY = 1
DEBUG ?= 0
ifeq ($(DEBUG),1)
CXXFLAGS += -Wall -Wno-unused-function -Wno-sign-compare -g -fPIC $(GL)
CCFLAGS += -Wall -Wno-unused-function -Wno-sign-compare -ggdb -fPIC
CXXFLAGS += -g -fPIC $(GL)
CCFLAGS += -ggdb -fPIC
else
CXXFLAGS += -O3 -g -Wall -Wno-unused-function -Wno-sign-compare -fPIC $(GL)
CCFLAGS += -Wall -Wno-unused-function -Wno-sign-compare -fPIC
CXXFLAGS += -O3 -g -fPIC $(GL)
CCFLAGS += -fPIC
endif

PROG =cuda
Expand Down Expand Up @@ -108,7 +106,7 @@ lib$(PROG).a: $(OBJS)
ar rcs $(OUTPUT_DIR)/lib$(PROG).a $(OBJS)

$(OUTPUT_DIR)/%.o: %.cc
$(CPP) $(CXXFLAGS) -I./ -I$(OUTPUT_DIR) -I$(CUDA_INSTALL_PATH)/include -c $< -o $@
$(CXX) $(CXXFLAGS) -I./ -I$(OUTPUT_DIR) -I$(CUDA_INSTALL_PATH)/include -c $< -o $@

$(OUTPUT_DIR)/%.o: %.c
$(CC) $(CCFLAGS) -I./ -I$(OUTPUT_DIR) -I$(CUDA_INSTALL_PATH)/include -c $< -o $@
Expand Down
8 changes: 7 additions & 1 deletion libcuda/cuda_runtime_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2209,10 +2209,16 @@ int CUDARTAPI __cudaSynchronizeThreads(void**, void*)
////////

extern int ptx_parse();

extern int ptx__scan_string(const char*);
extern FILE *ptx_in;

#ifdef __cplusplus
extern "C" {
#endif
extern int ptxinfo_parse();
#ifdef __cplusplus
}
#endif
extern int ptxinfo_debug;
extern FILE *ptxinfo_in;

Expand Down
1 change: 0 additions & 1 deletion libcuda/cuobjdump.l
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ newlines {newline}+


/* Looking for the identifier (filename) then the header is done */
/* <endheader>[[:alnum:]_\./]+ yylval.string_value = strdup(yytext); yy_pop_state(); return FILENAME; */
<endheader>{notnewline}+ yylval.string_value = strdup(yytext); yy_pop_state(); return IDENTIFIER;


Expand Down
6 changes: 2 additions & 4 deletions libopencl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ ifeq ($(OPENGL_SUPPORT),1)
GL = -DOPENGL_SUPPORT
endif

CPP = g++
CC = gcc
CREATELIBRARY = 1
DEBUG ?= 0
CCFLAGS = -O3 -g -Wall -fPIC $(GL)
Expand Down Expand Up @@ -106,11 +104,11 @@ depend:

$(OUTPUT_DIR)/nvopencl_wrapper: nvopencl_wrapper.cc
if [ ! -d bin ]; then mkdir bin; fi
g++ $(CCFLAGS) nvopencl_wrapper.cc -I./ -I$(NVOPENCL_INCDIR)/ -L $(NVOPENCL_LIBDIR) -lOpenCL -o $(OUTPUT_DIR)/bin/nvopencl_wrapper
$(CXX) $(CCFLAGS) nvopencl_wrapper.cc -I./ -I$(NVOPENCL_INCDIR)/ -L $(NVOPENCL_LIBDIR) -lOpenCL -o $(OUTPUT_DIR)/bin/nvopencl_wrapper


$(OUTPUT_DIR)/%.o: %.cc
$(CPP) $(CCFLAGS) -I./ -I$(CUDA_INSTALL_PATH)/include -c $< -o $@
$(CXX) $(CCFLAGS) -I./ -I$(CUDA_INSTALL_PATH)/include -c $< -o $@

clean:
rm -f $(PROG)
Expand Down
5 changes: 2 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TRACE?=1

include ../version_detection.mk

CXXFLAGS = -Wall -DDEBUG
CXXFLAGS += -DDEBUG
CXXFLAGS += -DCUDART_VERSION=$(CUDART_VERSION)

ifeq ($(GNUC_CPP0X), 1)
Expand All @@ -53,7 +53,6 @@ endif

OPTFLAGS += -g3 -fPIC

CPP = g++ $(SNOW)
OEXT = o

OUTPUT_DIR=$(SIM_OBJ_FILES_DIR)
Expand All @@ -76,7 +75,7 @@ clean:
rm -f *.o core *~ *.a Makefile.makedepend Makefile.makedepend.bak

$(OUTPUT_DIR)/%.$(OEXT): %.cc
$(CPP) $(OPTFLAGS) $(CXXFLAGS) -o $(OUTPUT_DIR)/$*.$(OEXT) -c $*.cc
$(CXX) $(OPTFLAGS) $(CXXFLAGS) -o $(OUTPUT_DIR)/$*.$(OEXT) -c $*.cc

option_parser.$(OEXT): option_parser.h

Expand Down
73 changes: 36 additions & 37 deletions src/cuda-sim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ INTEL=0
DEBUG?=0
TRACE?=0

CPP = g++ $(SNOW)
ifeq ($(INTEL),1)
CPP = icpc
CXX = icpc
CC = icc
endif

Expand Down Expand Up @@ -78,42 +77,42 @@ depend:
libgpgpu_ptx_sim.a: $(OBJS)
ar rcs $(OUTPUT_DIR)/libgpgpu_ptx_sim.a $(OUTPUT_DIR)/ptx.tab.o $(OUTPUT_DIR)/lex.ptx_.o $(OUTPUT_DIR)/ptxinfo.tab.o $(OUTPUT_DIR)/lex.ptxinfo_.o $(OBJS)

$(OUTPUT_DIR)/ptx.tab.o: $(OUTPUT_DIR)/ptx.tab.c
$(CPP) -c $(OPT) -DYYDEBUG $(OUTPUT_DIR)/ptx.tab.c -o $(OUTPUT_DIR)/ptx.tab.o
$(OUTPUT_DIR)/ptx.tab.o: $(OUTPUT_DIR)/ptx.tab.cpp
$(CXX) -c $(OPT) -DYYDEBUG $(OUTPUT_DIR)/ptx.tab.cpp -o $(OUTPUT_DIR)/ptx.tab.o

$(OUTPUT_DIR)/lex.ptx_.o: $(OUTPUT_DIR)/lex.ptx_.c
$(CPP) -c $(OPT) $(OUTPUT_DIR)/lex.ptx_.c -o $(OUTPUT_DIR)/lex.ptx_.o
$(OUTPUT_DIR)/lex.ptx_.o: $(OUTPUT_DIR)/lex.ptx_.cc
$(CXX) -c $(OPT) $(OUTPUT_DIR)/lex.ptx_.cc -o $(OUTPUT_DIR)/lex.ptx_.o

$(OUTPUT_DIR)/ptxinfo.tab.o: $(OUTPUT_DIR)/ptxinfo.tab.c
$(CPP) -c $(OPT) -DYYDEBUG $(OUTPUT_DIR)/ptxinfo.tab.c -o $(OUTPUT_DIR)/ptxinfo.tab.o
$(OUTPUT_DIR)/ptxinfo.tab.o: $(OUTPUT_DIR)/ptxinfo.tab.cpp
$(CXX) -c $(OPT) -DYYDEBUG $(OUTPUT_DIR)/ptxinfo.tab.cpp -o $(OUTPUT_DIR)/ptxinfo.tab.o

$(OUTPUT_DIR)/lex.ptxinfo_.o: $(OUTPUT_DIR)/lex.ptxinfo_.c $(OUTPUT_DIR)/ptxinfo.tab.c
$(CPP) -c $(OPT) $(OUTPUT_DIR)/lex.ptxinfo_.c -o $(OUTPUT_DIR)/lex.ptxinfo_.o
$(OUTPUT_DIR)/lex.ptxinfo_.o: $(OUTPUT_DIR)/lex.ptxinfo_.cc $(OUTPUT_DIR)/ptxinfo.tab.cpp
$(CXX) -c $(OPT) $(OUTPUT_DIR)/lex.ptxinfo_.cc -o $(OUTPUT_DIR)/lex.ptxinfo_.o

$(OUTPUT_DIR)/ptx.tab.c: ptx.y
bison --name-prefix=ptx_ -v -d ptx.y --file-prefix=$(OUTPUT_DIR)/ptx
$(OUTPUT_DIR)/ptx.tab.cpp: ptx.ypp
bison --name-prefix=ptx_ -v -d ptx.ypp --file-prefix=$(OUTPUT_DIR)/ptx

$(OUTPUT_DIR)/ptxinfo.tab.c: ptxinfo.y
bison --name-prefix=ptxinfo_ -v -d ptxinfo.y --file-prefix=$(OUTPUT_DIR)/ptxinfo
$(OUTPUT_DIR)/ptxinfo.tab.cpp: ptxinfo.ypp
bison --name-prefix=ptxinfo_ -v -d ptxinfo.ypp --file-prefix=$(OUTPUT_DIR)/ptxinfo

$(OUTPUT_DIR)/lex.ptx_.c: ptx.l
flex --outfile=$(OUTPUT_DIR)/lex.ptx_.c ptx.l
$(OUTPUT_DIR)/lex.ptx_.cc: ptx.l
flex --outfile=$(OUTPUT_DIR)/lex.ptx_.cc ptx.l

$(OUTPUT_DIR)/lex.ptxinfo_.c: ptxinfo.l
flex --outfile=$(OUTPUT_DIR)/lex.ptxinfo_.c ptxinfo.l
$(OUTPUT_DIR)/lex.ptxinfo_.cc: ptxinfo.l
flex --outfile=$(OUTPUT_DIR)/lex.ptxinfo_.cc ptxinfo.l

clean:
rm -f *~ *.o *.gcda *.gcno *.gcov libgpgpu_ptx_sim.a \
ptx.tab.h ptx.tab.c ptx.output lex.ptx_.c \
ptxinfo.tab.h ptxinfo.tab.c ptxinfo.output lex.ptxinfo_.c \
ptx.tab.hpp ptx.tab.cpp ptx.output lex.ptx_.cc \
ptxinfo.tab.hpp ptxinfo.tab.cpp ptxinfo.output lex.ptxinfo_.cc \
instructions.h ptx_parser_decode.def directed_tests.log
rm -f $(OUTPUT_DIR)/decuda_pred_table/*.o
rm -f $(OUTPUT_DIR)/Makefile.makedepend $(OUTPUT_DIR)/Makefile.makedepend.bak

$(OUTPUT_DIR)/%.o: %.c
$(CPP) -c $(OPT) $< -o $(OUTPUT_DIR)/$*.o
$(CXX) -c $(OPT) $< -o $(OUTPUT_DIR)/$*.o
$(OUTPUT_DIR)/%.o: %.cc
$(CPP) -c $(CXX_OPT) $< -o $(OUTPUT_DIR)/$*.o
$(CXX) -c $(CXX_OPT) $< -o $(OUTPUT_DIR)/$*.o

$(OUTPUT_DIR)/instructions.h: instructions.cc
@touch $*.h
Expand All @@ -127,24 +126,24 @@ $(OUTPUT_DIR)/instructions.h: instructions.cc
@chmod -w $*.h
@echo "created $(OUTPUT_DIR)/instructions.h"

$(OUTPUT_DIR)/ptx_parser_decode.def: $(OUTPUT_DIR)/ptx.tab.c
$(OUTPUT_DIR)/ptx_parser_decode.def: $(OUTPUT_DIR)/ptx.tab.cpp
ifeq ($(shell uname),Linux)
cat $(OUTPUT_DIR)/ptx.tab.h | grep "=" | sed 's/^[ ]\+//' | sed 's/[=,]//g' | sed 's/\([_A-Z1-9]\+\)[ ]\+\([0-9]\+\)/\1 \1/' | sed 's/^/DEF(/' | sed 's/ /,"/' | sed 's/$$/")/' > $(OUTPUT_DIR)/ptx_parser_decode.def
cat $(OUTPUT_DIR)/ptx.tab.hpp | grep "=" | sed 's/^[ ]\+//' | sed 's/[=,]//g' | sed 's/\([_A-Z1-9]\+\)[ ]\+\([0-9]\+\)/\1 \1/' | sed 's/^/DEF(/' | sed 's/ /,"/' | sed 's/$$/")/' > $(OUTPUT_DIR)/ptx_parser_decode.def
else
cat $(OUTPUT_DIR)/ptx.tab.h | grep "=" | sed -E 's/^ +//' | sed 's/[=,]//g' | sed -E 's/([_A-Z1-9]+).*/\1 \1/' | sed 's/^/DEF(/' | sed 's/ /,"/' | sed 's/$$/")/' > $(OUTPUT_DIR)/ptx_parser_decode.def
cat $(OUTPUT_DIR)/ptx.tab.hpp | grep "=" | sed -E 's/^ +//' | sed 's/[=,]//g' | sed -E 's/([_A-Z1-9]+).*/\1 \1/' | sed 's/^/DEF(/' | sed 's/ /,"/' | sed 's/$$/")/' > $(OUTPUT_DIR)/ptx_parser_decode.def
endif

$(OUTPUT_DIR)/instructions.o: $(OUTPUT_DIR)/instructions.h $(OUTPUT_DIR)/ptx.tab.c
$(OUTPUT_DIR)/cuda_device_printf.o: $(OUTPUT_DIR)/ptx.tab.c
$(OUTPUT_DIR)/ptx_ir.o: $(OUTPUT_DIR)/ptx.tab.c $(OUTPUT_DIR)/ptx_parser_decode.def
$(OUTPUT_DIR)/ptx_loader.o: $(OUTPUT_DIR)/ptx.tab.c $(OUTPUT_DIR)/ptx_parser_decode.def
$(OUTPUT_DIR)/ptx_parser.o: $(OUTPUT_DIR)/ptx.tab.c $(OUTPUT_DIR)/ptx_parser_decode.def
$(OUTPUT_DIR)/ptxinfo.tab.o: $(OUTPUT_DIR)/ptx.tab.c
$(OUTPUT_DIR)/ptx-stats.o: $(OUTPUT_DIR)/ptx.tab.c
$(OUTPUT_DIR)/ptx_sim.o: $(OUTPUT_DIR)/ptx.tab.c
$(OUTPUT_DIR)/cuda-sim.o: $(OUTPUT_DIR)/ptx.tab.c $(SIM_OBJ_FILES_DIR)/detailed_version
$(OUTPUT_DIR)/lex.ptxinfo_.o: $(OUTPUT_DIR)/ptx.tab.c
$(OUTPUT_DIR)/lex.ptx_.o: $(OUTPUT_DIR)/ptx.tab.c
$(OUTPUT_DIR)/cuda_device_runtime.o: $(OUTPUT_DIR)/ptx.tab.c
$(OUTPUT_DIR)/instructions.o: $(OUTPUT_DIR)/instructions.h $(OUTPUT_DIR)/ptx.tab.cpp
$(OUTPUT_DIR)/cuda_device_printf.o: $(OUTPUT_DIR)/ptx.tab.cpp
$(OUTPUT_DIR)/ptx_ir.o: $(OUTPUT_DIR)/ptx.tab.cpp $(OUTPUT_DIR)/ptx_parser_decode.def
$(OUTPUT_DIR)/ptx_loader.o: $(OUTPUT_DIR)/ptx.tab.cpp $(OUTPUT_DIR)/ptx_parser_decode.def
$(OUTPUT_DIR)/ptx_parser.o: $(OUTPUT_DIR)/ptx.tab.cpp $(OUTPUT_DIR)/ptx_parser_decode.def
$(OUTPUT_DIR)/ptxinfo.tab.o: $(OUTPUT_DIR)/ptx.tab.cpp
$(OUTPUT_DIR)/ptx-stats.o: $(OUTPUT_DIR)/ptx.tab.cpp
$(OUTPUT_DIR)/ptx_sim.o: $(OUTPUT_DIR)/ptx.tab.cpp
$(OUTPUT_DIR)/cuda-sim.o: $(OUTPUT_DIR)/ptx.tab.cpp $(SIM_OBJ_FILES_DIR)/detailed_version
$(OUTPUT_DIR)/lex.ptxinfo_.o: $(OUTPUT_DIR)/ptx.tab.cpp
$(OUTPUT_DIR)/lex.ptx_.o: $(OUTPUT_DIR)/ptx.tab.cpp
$(OUTPUT_DIR)/cuda_device_runtime.o: $(OUTPUT_DIR)/ptx.tab.cpp

include $(OUTPUT_DIR)/Makefile.makedepend
2 changes: 1 addition & 1 deletion src/cuda-sim/cuda-sim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include "instructions.h"
#include "ptx_ir.h"
#include "ptx.tab.h"
#include "ptx.tab.hpp"
#include "ptx_sim.h"
#include <stdio.h>

Expand Down
2 changes: 1 addition & 1 deletion src/cuda-sim/instructions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "ptx_ir.h"
#include "opcodes.h"
#include "ptx_sim.h"
#include "ptx.tab.h"
#include "ptx.tab.hpp"
#include <stdlib.h>
#include <math.h>
#include <fenv.h>
Expand Down
2 changes: 1 addition & 1 deletion src/cuda-sim/ptx.l
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%option prefix="ptx_"
%{
#include "opcodes.h"
#include "ptx.tab.h"
#include "ptx.tab.hpp"
#include <string.h>

char linebuf[1024];
Expand Down
2 changes: 1 addition & 1 deletion src/cuda-sim/ptx.y → src/cuda-sim/ptx.ypp
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdlib.h>
#include <string.h>
#include <math.h>
void syntax_not_implemented();
extern int g_func_decl;
void syntax_not_implemented();
int ptx_lex(void);
int ptx_error(const char *);
%}
Expand Down
2 changes: 1 addition & 1 deletion src/cuda-sim/ptx_ir.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include "ptx_parser.h"
#include "ptx_ir.h"
#include "ptx.tab.h"
#include "ptx.tab.hpp"
#include "opcodes.h"
#include <stdio.h>
#include <stdlib.h>
Expand Down
1 change: 0 additions & 1 deletion src/cuda-sim/ptx_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ bool g_override_embedded_ptx = false;

extern int ptx_parse();
extern int ptx__scan_string(const char*);

extern std::map<unsigned,const char*> get_duplicate();

const char *g_ptxinfo_filename;
Expand Down
2 changes: 1 addition & 1 deletion src/cuda-sim/ptx_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include "ptx_parser.h"
#include "ptx_ir.h"
#include "ptx.tab.h"
#include "ptx.tab.hpp"
#include <stdarg.h>

extern int ptx_error( const char *s );
Expand Down
2 changes: 1 addition & 1 deletion src/cuda-sim/ptx_sim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "ptx_sim.h"
#include <string>
#include "ptx_ir.h"
#include "ptx.tab.h"
#include "ptx.tab.hpp"
#include "../gpgpu-sim/gpu-sim.h"
#include "../gpgpu-sim/shader.h"

Expand Down
2 changes: 1 addition & 1 deletion src/cuda-sim/ptxinfo.l
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%option yylineno
%option prefix="ptxinfo_"
%{
#include "ptxinfo.tab.h"
#include "ptxinfo.tab.hpp"
#include <string.h>

#define LINEBUF_SIZE 1024
Expand Down
File renamed without changes.
Loading