History

Reorganize the source tree.

* Documentation is now in "docs". * Source code is now in "src". * Misc. fixes here and there so that everything still works. I think I got everything in this commit, but I only tested this on Linux (Make) and Windows (CMake), so I might've messed something up on other platforms...

gus knight committed 11 years ago

Commit 47e06c61 parent 694d0fd45 files · +90 −91Browse files

Unified · Split

45 files
  1. .gitignore +2 −2
  2. CMakeLists.txt +25 −26
  3. configure +4 −4
  4. docs/Changelog +0 −0
  5. docs/CodingStyle.md +0 −0
  6. docs/TODO +0 −0
  7. docs/config.texi.in +0 −0
  8. docs/tcc-doc.texi +0 −0
  9. docs/texi2pod.pl +0 −0
  10. lib/Makefile +8 −8
  11. src/Makefile +21 −21
  12. src/arm/arm-gen.c +1 −1
  13. src/arm/arm64-gen.c +1 −1
  14. src/cil/il-gen.c +0 −0
  15. src/cil/il-opcodes.h +0 −0
  16. src/coff.h +0 −0
  17. src/config.h.in +0 −0
  18. src/conftest.c +0 −0
  19. src/elf.h +0 −0
  20. src/libtcc.c +6 −6
  21. src/libtcc.h +0 −0
  22. src/stab.def +0 −0
  23. src/stab.h +0 −0
  24. src/tcc.c +0 −0
  25. src/tcc.h +5 −5
  26. src/tccasm.c +0 −0
  27. src/tcccoff.c +0 −0
  28. src/tccelf.c +1 −1
  29. src/tccgen.c +0 −0
  30. src/tcclib.h +0 −0
  31. src/tccpe.c +1 −1
  32. src/tccpp.c +0 −0
  33. src/tccrun.c +0 −0
  34. src/tcctok.h +1 −1
  35. src/tms320c67/c67-gen.c +1 −1
  36. src/x86/i386-asm.c +1 −1
  37. src/x86/i386-asm.h +0 −0
  38. src/x86/i386-gen.c +1 −1
  39. src/x86/i386-tok.h +0 −0
  40. src/x86/x86_64-asm.h +0 −0
  41. src/x86/x86_64-gen.c +1 −1
  42. tests/Makefile +5 −5
  43. tests/pp/Makefile +1 −1
  44. tests/tests2/Makefile +3 −3
  45. win32/tools/tiny_libmaker.c +1 −1
.gitignore+2−2
@@ -5,7 +5,7 @@ a.out · 4 unmodified lines
5*.log5*.log
6tcc_g6tcc_g
7tcc7tcc
8/*-tcc8/src/*-tcc
9tc2.c9tc2.c
10doc10doc
11tc3s.c11tc3s.c
@@ -63,7 +63,7 @@ lib/i386-win32 · 51 unmodified lines
63lib/arm63lib/arm
64lib/arm6464lib/arm64
65tcc-doc.info65tcc-doc.info
66conftest*66conftest*!conftest.c
67tiny_libmaker67tiny_libmaker
68*.dSYM68*.dSYM
69*~69*~
CMakeLists.txt+25−26
@@ -85,14 +85,14 @@ endif() · 84 unmodified lines
85 85
86file(STRINGS "VERSION" TCC_VERSION)86file(STRINGS "VERSION" TCC_VERSION)
87list(GET TCC_VERSION 0 TCC_VERSION)87list(GET TCC_VERSION 0 TCC_VERSION)
88include_directories(${CMAKE_BINARY_DIR})88include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/)
89configure_file(config.h.in config.h)89configure_file(src/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/config.h)
90configure_file(config.texi.in config.texi)90configure_file(docs/config.texi.in ${CMAKE_CURRENT_SOURCE_DIR}/docs/config.texi)
91 91
92# Utility variables92# Utility variables
93set(I386_SOURCES i386-gen.c i386-asm.c i386-asm.h i386-tok.h)93set(I386_SOURCES src/x86/i386-gen.c src/x86/i386-asm.c src/x86/i386-asm.h src/x86/i386-tok.h)
94set(X86_64_SOURCES x86_64-gen.c i386-asm.c x86_64-asm.h)94set(X86_64_SOURCES src/x86/x86_64-gen.c src/x86/i386-asm.c src/x86/x86_64-asm.h)
95set(ARM_SOURCES arm_gen.c)95set(ARM_SOURCES src/arm/arm_gen.c)
96 96
97set(LIBTCC1_I386_SOURCES lib/alloca86.S lib/alloca86-bt.S)97set(LIBTCC1_I386_SOURCES lib/alloca86.S lib/alloca86-bt.S)
98set(LIBTCC1_WIN_SOURCES win32/lib/crt1.c win32/lib/wincrt1.c win32/lib/dllcrt1.c win32/lib/dllmain.c win32/lib/chkstk.S)98set(LIBTCC1_WIN_SOURCES win32/lib/crt1.c win32/lib/wincrt1.c win32/lib/dllcrt1.c win32/lib/dllmain.c win32/lib/chkstk.S)
@@ -157,22 +157,22 @@ macro(make_tcc native_name cross_name cross_enabled definitions tcc_sources libt · 58 unmodified lines
157 157
158 if (TCC_BUILD_NATIVE)158 if (TCC_BUILD_NATIVE)
159 add_library(libtcc159 add_library(libtcc
160 libtcc.c160 src/libtcc.c
161 tccpp.c161 src/tccpp.c
162 tccgen.c162 src/tccgen.c
163 tccelf.c163 src/tccelf.c
164 tccasm.c164 src/tccasm.c
165 tccrun.c165 src/tccrun.c
166 tcc.h166 src/tcc.h
167 libtcc.h167 src/libtcc.h
168 tcctok.h168 src/tcctok.h
169 ${tcc_sources}169 ${tcc_sources}
170 )170 )
171 set_target_properties(libtcc PROPERTIES OUTPUT_NAME tcc PREFIX lib)171 set_target_properties(libtcc PROPERTIES OUTPUT_NAME tcc PREFIX lib)
172 if(WIN32)172 if(WIN32)
173 set_target_properties(libtcc PROPERTIES LINK_FLAGS "-Wl,--output-def,libtcc.def")173 set_target_properties(libtcc PROPERTIES LINK_FLAGS "-Wl,--output-def,libtcc.def")
174 endif()174 endif()
175 add_executable(tcc tcc.c)175 add_executable(tcc src/tcc.c)
176 target_link_libraries(tcc libtcc)176 target_link_libraries(tcc libtcc)
177 if(NOT WIN32)177 if(NOT WIN32)
178 target_link_libraries(tcc dl)178 target_link_libraries(tcc dl)
@@ -185,7 +185,7 @@ macro(make_tcc native_name cross_name cross_enabled definitions tcc_sources libt · 6 unmodified lines
185 endif()185 endif()
186 endif()186 endif()
187 elseif(${cross_enabled})187 elseif(${cross_enabled})
188 add_executable(${cross_name}-tcc tcc.c)188 add_executable(${cross_name}-tcc src/tcc.c)
189 set_target_properties(${cross_name}-tcc PROPERTIES COMPILE_DEFINITIONS "ONE_SOURCE;${definitions}")189 set_target_properties(${cross_name}-tcc PROPERTIES COMPILE_DEFINITIONS "ONE_SOURCE;${definitions}")
190 install(TARGETS ${cross_name}-tcc RUNTIME DESTINATION ${EXE_PATH})190 install(TARGETS ${cross_name}-tcc RUNTIME DESTINATION ${EXE_PATH})
191 191
@@ -197,17 +197,17 @@ endmacro() · 5 unmodified lines
197 197
198make_tcc("Win32" i386-w64-mingw32 TCC_BUILD_WIN32198make_tcc("Win32" i386-w64-mingw32 TCC_BUILD_WIN32
199 "TCC_TARGET_I386;TCC_TARGET_PE"199 "TCC_TARGET_I386;TCC_TARGET_PE"
200 "${I386_SOURCES};tccpe.c"200 "${I386_SOURCES};src/tccpe.c"
201 tiny_libmaker_32 "${LIBTCC1_I386_SOURCES};${LIBTCC1_WIN_SOURCES}" "win32/include;win32/include/winapi"201 tiny_libmaker_32 "${LIBTCC1_I386_SOURCES};${LIBTCC1_WIN_SOURCES}" "win32/include;win32/include/winapi"
202)202)
203make_tcc("Win64" x86_64-w64-mingw32 TCC_BUILD_WIN64203make_tcc("Win64" x86_64-w64-mingw32 TCC_BUILD_WIN64
204 "TCC_TARGET_X86_64;TCC_TARGET_PE"204 "TCC_TARGET_X86_64;TCC_TARGET_PE"
205 "${X86_64_SOURCES};tccpe.c"205 "${X86_64_SOURCES};src/tccpe.c"
206 tiny_libmaker_64 "lib/alloca86_64.S;${LIBTCC1_WIN_SOURCES}" "win32/include;win32/include/winapi"206 tiny_libmaker_64 "lib/alloca86_64.S;${LIBTCC1_WIN_SOURCES}" "win32/include;win32/include/winapi"
207)207)
208make_tcc("WinCE" arm-wince-mingw32ce TCC_BUILD_WINCE208make_tcc("WinCE" arm-wince-mingw32ce TCC_BUILD_WINCE
209 "TCC_TARGET_ARM;TCC_ARM_VERSION=${TCC_ARM_VERSION};TCC_TARGET_PE"209 "TCC_TARGET_ARM;TCC_ARM_VERSION=${TCC_ARM_VERSION};TCC_TARGET_PE"
210 "${ARM_SOURCES};tccpe.c"210 "${ARM_SOURCES};src/tccpe.c"
211 "" "" ""211 "" "" ""
212)212)
213make_tcc("i386" i386-linux-gnu TCC_BUILD_I386213make_tcc("i386" i386-linux-gnu TCC_BUILD_I386
@@ -248,7 +248,7 @@ make_tcc("" arm-linux-gnu TCC_BUILD_ARM_VFP · 34 unmodified lines
248)248)
249make_tcc("" c67 TCC_BUILD_C67249make_tcc("" c67 TCC_BUILD_C67
250 TCC_TARGET_C67250 TCC_TARGET_C67
251 "c67-gen.c;tcccoff.c"251 "c67-gen.c;src/tcccoff.c"
252 "" "" ""252 "" "" ""
253)253)
254 254
@@ -257,14 +257,14 @@ add_subdirectory(tests) · 2 unmodified lines
257find_program(MAKEINFO NAMES makeinfo PATHS C:/MinGW/MSYS/1.0/bin)257find_program(MAKEINFO NAMES makeinfo PATHS C:/MinGW/MSYS/1.0/bin)
258if(MAKEINFO)258if(MAKEINFO)
259 add_custom_command(OUTPUT tcc-doc.html259 add_custom_command(OUTPUT tcc-doc.html
260 COMMAND ${MAKEINFO} --no-split --html -o tcc-doc.html ${CMAKE_CURRENT_SOURCE_DIR}/tcc-doc.texi260 COMMAND ${MAKEINFO} --no-split --html -o tcc-doc.html ${CMAKE_CURRENT_SOURCE_DIR}/docs/tcc-doc.texi
261 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tcc-doc.texi261 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/docs/tcc-doc.texi
262 )262 )
263 set(TCC_DOC_FILES tcc-doc.html)263 set(TCC_DOC_FILES tcc-doc.html)
264 if(NOT WIN32)264 if(NOT WIN32)
265 add_custom_command(OUTPUT tcc-doc.info265 add_custom_command(OUTPUT tcc-doc.info
266 COMMAND ${MAKEINFO} -o tcc-doc.info ${CMAKE_CURRENT_SOURCE_DIR}/tcc-doc.texi266 COMMAND ${MAKEINFO} -o tcc-doc.info ${CMAKE_CURRENT_SOURCE_DIR}/docs/tcc-doc.texi
267 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tcc-doc.texi267 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/docs/tcc-doc.texi
268 )268 )
269 set(TCC_DOC_FILES ${TCC_DOC_FILES} tcc-doc.info)269 set(TCC_DOC_FILES ${TCC_DOC_FILES} tcc-doc.info)
270 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tcc-doc.info DESTINATION share/info)270 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tcc-doc.info DESTINATION share/info)
@@ -290,4 +290,3 @@ else() · 19 unmodified lines
290 install(DIRECTORY win32/include/ DESTINATION lib/tcc/win32/include)290 install(DIRECTORY win32/include/ DESTINATION lib/tcc/win32/include)
291 install(DIRECTORY include/ DESTINATION lib/tcc/win32/include)291 install(DIRECTORY include/ DESTINATION lib/tcc/win32/include)
292endif()292endif()
293
configure+4−4
@@ -337,7 +337,7 @@ strip="${cross_prefix}${strip}" · 336 unmodified lines
337CONFTEST=./conftest$EXESUF337CONFTEST=./conftest$EXESUF
338 338
339if test -z "$cross_prefix" ; then339if test -z "$cross_prefix" ; then
340 if ! $cc -o $CONFTEST $source_path/conftest.c 2>/dev/null ; then340 if ! $cc -o $CONFTEST $source_path/src/conftest.c 2>/dev/null ; then
341 echo "configure: error: '$cc' failed to compile conftest.c."341 echo "configure: error: '$cc' failed to compile conftest.c."
342 else342 else
343 bigendian="$($CONFTEST bigendian)"343 bigendian="$($CONFTEST bigendian)"
@@ -560,7 +560,7 @@ fi · 216 unmodified lines
560version=`head $source_path/VERSION`560version=`head $source_path/VERSION`
561echo "VERSION=$version" >>config.mak561echo "VERSION=$version" >>config.mak
562echo "#define TCC_VERSION \"$version\"" >> $TMPH562echo "#define TCC_VERSION \"$version\"" >> $TMPH
563echo "@set VERSION $version" > config.texi563echo "@set VERSION $version" >docs/config.texi
564echo "SRC_PATH=$source_path" >>config.mak564echo "SRC_PATH=$source_path" >>config.mak
565 565
566if test "$source_path_used" = "yes" ; then566if test "$source_path_used" = "yes" ; then
@@ -573,9 +573,9 @@ else · 6 unmodified lines
573fi573fi
574echo 'top_builddir=$(TOP)' >>config.mak574echo 'top_builddir=$(TOP)' >>config.mak
575 575
576diff $TMPH config.h >/dev/null 2>&1576diff $TMPH src/config.h >/dev/null 2>&1
577if test $? -ne 0 ; then577if test $? -ne 0 ; then
578 mv -f $TMPH config.h578 mv -f $TMPH src/config.h
579else579else
580 echo "config.h is unchanged"580 echo "config.h is unchanged"
581fi581fi
docs/Changelogrenamed from Changelog+0−0

File renamed without changes.

docs/CodingStyle.mdrenamed from CodingStyle.md+0−0

File renamed without changes.

docs/TODOrenamed from TODO+0−0

File renamed without changes.

docs/config.texi.inrenamed from config.texi.in+0−0

File renamed without changes.

docs/tcc-doc.texirenamed from tcc-doc.texi+0−0

File renamed without changes.

docs/texi2pod.plrenamed from texi2pod.pl+0−0

File mode changed from 100755 to 100644.

lib/Makefile+8−8
@@ -2,9 +2,9 @@ · 1 unmodified line
2# Tiny C Compiler Makefile for libtcc1.a2# Tiny C Compiler Makefile for libtcc1.a
3#3#
4 4
5TOP = ..5TOP = ../src
6include $(TOP)/Makefile6include $(TOP)/Makefile
7VPATH = $(top_srcdir)/lib $(top_srcdir)/win32/lib7VPATH = $(top_srcdir)/../lib $(top_srcdir)/../win32/lib
8 8
9ifndef TARGET # native library9ifndef TARGET # native library
10 ifdef CONFIG_WIN6410 ifdef CONFIG_WIN64
@@ -37,7 +37,7 @@ endif · 26 unmodified lines
37BCHECK_O = bcheck.o37BCHECK_O = bcheck.o
38DIR = $(TARGET)38DIR = $(TARGET)
39 39
40native : ../libtcc1.a40native : $(DIR)/libtcc1.a
41cross : $(DIR)/libtcc1.a41cross : $(DIR)/libtcc1.a
42 42
43native : TCC = $(TOP)/tcc$(EXESUF)43native : TCC = $(TOP)/tcc$(EXESUF)
@@ -61,26 +61,26 @@ CFLAGS := $(filter-out -fstack-protector-strong,$(CFLAGS)) · 17 unmodified lines
61ifeq "$(TARGET)" "i386-win"61ifeq "$(TARGET)" "i386-win"
62 OBJ = $(addprefix $(DIR)/,$(WIN32_O))62 OBJ = $(addprefix $(DIR)/,$(WIN32_O))
63 TGT = -DTCC_TARGET_I386 -DTCC_TARGET_PE63 TGT = -DTCC_TARGET_I386 -DTCC_TARGET_PE
64 XCC ?= $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include64 XCC ?= $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/../include
65 XAR ?= $(DIR)/tiny_libmaker$(EXESUF)65 XAR ?= $(DIR)/tiny_libmaker$(EXESUF)
66 PICFLAGS =66 PICFLAGS =
67else67else
68ifeq "$(TARGET)" "x86_64-win"68ifeq "$(TARGET)" "x86_64-win"
69 OBJ = $(addprefix $(DIR)/,$(WIN64_O))69 OBJ = $(addprefix $(DIR)/,$(WIN64_O))
70 TGT = -DTCC_TARGET_X86_64 -DTCC_TARGET_PE70 TGT = -DTCC_TARGET_X86_64 -DTCC_TARGET_PE
71 XCC = $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include71 XCC = $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/../include
72 XAR ?= $(DIR)/tiny_libmaker$(EXESUF)72 XAR ?= $(DIR)/tiny_libmaker$(EXESUF)
73 PICFLAGS =73 PICFLAGS =
74else74else
75ifeq "$(TARGET)" "i386"75ifeq "$(TARGET)" "i386"
76 OBJ = $(addprefix $(DIR)/,$(I386_O))76 OBJ = $(addprefix $(DIR)/,$(I386_O))
77 TGT = -DTCC_TARGET_I38677 TGT = -DTCC_TARGET_I386
78 XCC ?= $(TCC) -B$(TOP)78 XCC ?= $(TCC) -B$(TOP) -I$(top_srcdir)/../include
79else79else
80ifeq "$(TARGET)" "x86_64"80ifeq "$(TARGET)" "x86_64"
81 OBJ = $(addprefix $(DIR)/,$(X86_64_O))81 OBJ = $(addprefix $(DIR)/,$(X86_64_O))
82 TGT = -DTCC_TARGET_X86_6482 TGT = -DTCC_TARGET_X86_64
83 XCC ?= $(TCC) -B$(TOP)83 XCC ?= $(TCC) -B$(TOP) -I$(top_srcdir)/../include
84else84else
85ifeq "$(TARGET)" "arm"85ifeq "$(TARGET)" "arm"
86 OBJ = $(addprefix $(DIR)/,$(ARM_O))86 OBJ = $(addprefix $(DIR)/,$(ARM_O))
@@ -110,7 +110,7 @@ endif · 23 unmodified lines
110 110
111XAR ?= $(AR)111XAR ?= $(AR)
112 112
113$(DIR)/libtcc1.a ../libtcc1.a : $(OBJ) $(XAR)113$(DIR)/libtcc1.a : $(OBJ) $(XAR)
114 $(XAR) rcs $@ $(OBJ)114 $(XAR) rcs $@ $(OBJ)
115$(DIR)/%.o : %.c115$(DIR)/%.o : %.c
116 $(XCC) -c $< -o $@ $(XFLAGS)116 $(XCC) -c $< -o $@ $(XFLAGS)
src/Makefilerenamed from Makefile+21−21
@@ -3,7 +3,7 @@ · 2 unmodified lines
3#3#
4 4
5TOP ?= .5TOP ?= .
6include $(TOP)/config.mak6include $(TOP)/../config.mak
7VPATH = $(top_srcdir)7VPATH = $(top_srcdir)
8 8
9CPPFLAGS += -I$(TOP) # for config.h9CPPFLAGS += -I$(TOP) # for config.h
@@ -113,14 +113,14 @@ endif · 103 unmodified lines
113 113
114CORE_FILES = tcc.c libtcc.c tccpp.c tccgen.c tccelf.c tccasm.c tccrun.c114CORE_FILES = tcc.c libtcc.c tccpp.c tccgen.c tccelf.c tccasm.c tccrun.c
115CORE_FILES += tcc.h config.h libtcc.h tcctok.h115CORE_FILES += tcc.h config.h libtcc.h tcctok.h
116I386_FILES = $(CORE_FILES) i386-gen.c i386-asm.c i386-asm.h i386-tok.h116I386_FILES = $(CORE_FILES) x86/i386-gen.c x86/i386-asm.c x86/i386-asm.h x86/i386-tok.h
117WIN32_FILES = $(CORE_FILES) i386-gen.c i386-asm.c i386-asm.h i386-tok.h tccpe.c117WIN32_FILES = $(CORE_FILES) x86/i386-gen.c x86/i386-asm.c x86/i386-asm.h x86/i386-tok.h tccpe.c
118WIN64_FILES = $(CORE_FILES) x86_64-gen.c i386-asm.c x86_64-asm.h tccpe.c118WIN64_FILES = $(CORE_FILES) x86/x86_64-gen.c x86/i386-asm.c x86/x86_64-asm.h tccpe.c
119WINCE_FILES = $(CORE_FILES) arm-gen.c tccpe.c119WINCE_FILES = $(CORE_FILES) arm/arm-gen.c tccpe.c
120X86_64_FILES = $(CORE_FILES) x86_64-gen.c i386-asm.c x86_64-asm.h120X86_64_FILES = $(CORE_FILES) x86/x86_64-gen.c x86/i386-asm.c x86/x86_64-asm.h
121ARM_FILES = $(CORE_FILES) arm-gen.c121ARM_FILES = $(CORE_FILES) arm/arm-gen.c
122ARM64_FILES = $(CORE_FILES) arm64-gen.c122ARM64_FILES = $(CORE_FILES) arm/arm64-gen.c
123C67_FILES = $(CORE_FILES) c67-gen.c tcccoff.c123C67_FILES = $(CORE_FILES) tms320c67/c67-gen.c tcccoff.c
124 124
125ifdef CONFIG_WIN64125ifdef CONFIG_WIN64
126PROGS+=tiny_impdef$(EXESUF) tiny_libmaker$(EXESUF)126PROGS+=tiny_impdef$(EXESUF) tiny_libmaker$(EXESUF)
@@ -249,18 +249,18 @@ libtcc.dll libtcc.def libtcc.a: $(LIBTCC_OBJ) · 122 unmodified lines
249endif249endif
250 250
251# windows utilities251# windows utilities
252tiny_impdef$(EXESUF): win32/tools/tiny_impdef.c252tiny_impdef$(EXESUF): ../win32/tools/tiny_impdef.c
253 $(CC) -o $@ $< $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)253 $(CC) -o $@ $< $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
254tiny_libmaker$(EXESUF): win32/tools/tiny_libmaker.c254tiny_libmaker$(EXESUF): ../win32/tools/tiny_libmaker.c
255 $(CC) -o $@ $< $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)255 $(CC) -o $@ $< $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
256 256
257# TinyCC runtime libraries257# TinyCC runtime libraries
258libtcc1.a : FORCE258libtcc1.a : FORCE
259 $(MAKE) -C lib native259 $(MAKE) -C ../lib native
260 if test ! -d $(ARCH); then mkdir $(ARCH); fi260 if test ! -d $(ARCH); then mkdir $(ARCH); fi
261 if test ! -L $(ARCH)/$@; then ln -sf ../$@ $(ARCH)/$@; fi261 if test ! -L $(ARCH)/$@; then ln -sf ../$@ $(ARCH)/$@; fi
262lib/%/libtcc1.a : FORCE $(PROGS_CROSS)262lib/%/libtcc1.a : FORCE $(PROGS_CROSS)
263 $(MAKE) -C lib cross TARGET=$*263 $(MAKE) -C ../lib cross TARGET=$*
264 264
265FORCE:265FORCE:
266 266
@@ -360,21 +360,21 @@ uninstall: · 93 unmodified lines
360endif360endif
361 361
362# documentation and man page362# documentation and man page
363tcc-doc.html: tcc-doc.texi363tcc-doc.html: ../docs/tcc-doc.texi
364 -makeinfo --no-split --html --number-sections -o $@ $<364 -makeinfo --no-split --html --number-sections -o $@ $<
365 365
366tcc.1: tcc-doc.texi366tcc.1: ../docs/tcc-doc.texi
367 -$(top_srcdir)/texi2pod.pl $< tcc.pod367 -$(top_srcdir)/texi2pod.pl $< tcc.pod
368 -pod2man --section=1 --center="Tiny C Compiler" --release=`cat $(top_srcdir)/VERSION` tcc.pod > $@368 -pod2man --section=1 --center="Tiny C Compiler" --release=`cat $(top_srcdir)/../VERSION` tcc.pod > $@
369 369
370tcc-doc.info: tcc-doc.texi370tcc-doc.info: ../docs/tcc-doc.texi
371 -makeinfo $<371 -makeinfo $<
372 372
373# in tests subdir373# in tests subdir
374export LIBTCC1374export LIBTCC1
375 375
376%est:376%est:
377 $(MAKE) -C tests $@ 'PROGS_CROSS=$(PROGS_CROSS)'377 $(MAKE) -C ../tests $@ 'PROGS_CROSS=$(PROGS_CROSS)'
378 378
379clean:379clean:
380 rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.so* *.out *.log \380 rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.so* *.out *.log \
@@ -384,9 +384,9 @@ ifeq ($(HOST_OS),Linux) · 3 unmodified lines
384 -rm -r ./C:384 -rm -r ./C:
385endif385endif
386 -rm *-tcc$(EXESUF)386 -rm *-tcc$(EXESUF)
387 $(MAKE) -C tests $@387 $(MAKE) -C ../tests $@
388ifneq ($(LIBTCC1),)388ifneq ($(LIBTCC1),)
389 $(MAKE) -C lib $@389 $(MAKE) -C ../lib $@
390endif390endif
391 391
392distclean: clean392distclean: clean
@@ -404,7 +404,7 @@ TAGS: · 11 unmodified lines
404 404
405# create release tarball from *current* git branch (including tcc-doc.html405# create release tarball from *current* git branch (including tcc-doc.html
406# and converting two files to CRLF)406# and converting two files to CRLF)
407TCC-VERSION := tcc-$(shell cat $(top_srcdir)/VERSION)407TCC-VERSION := tcc-$(shell cat $(top_srcdir)/../VERSION)
408tar: tcc-doc.html408tar: tcc-doc.html
409 mkdir $(TCC-VERSION)409 mkdir $(TCC-VERSION)
410 ( cd $(TCC-VERSION) && git --git-dir ../.git checkout -f )410 ( cd $(TCC-VERSION) && git --git-dir ../.git checkout -f )
src/arm/arm-gen.crenamed from arm-gen.c+1−1
@@ -151,7 +151,7 @@ enum float_abi { · 150 unmodified lines
151/******************************************************/151/******************************************************/
152#else /* ! TARGET_DEFS_ONLY */152#else /* ! TARGET_DEFS_ONLY */
153/******************************************************/153/******************************************************/
154#include "tcc.h"154#include "../tcc.h"
155 155
156enum float_abi float_abi;156enum float_abi float_abi;
157 157
src/arm/arm64-gen.crenamed from arm64-gen.c+1−1
@@ -58,7 +58,7 @@ typedef int RegArgs; · 57 unmodified lines
58/******************************************************/58/******************************************************/
59#else /* ! TARGET_DEFS_ONLY */59#else /* ! TARGET_DEFS_ONLY */
60/******************************************************/60/******************************************************/
61#include "tcc.h"61#include "../tcc.h"
62#include <assert.h>62#include <assert.h>
63 63
64ST_DATA const int reg_classes[NB_REGS] = {64ST_DATA const int reg_classes[NB_REGS] = {
src/cil/il-gen.crenamed from il-gen.c+0−0

File renamed without changes.

src/cil/il-opcodes.hrenamed from il-opcodes.h+0−0

File renamed without changes.

src/coff.hrenamed from coff.h+0−0

File renamed without changes.

src/config.h.inrenamed from config.h.in+0−0

File renamed without changes.

src/conftest.crenamed from conftest.c+0−0

File renamed without changes.

src/elf.hrenamed from elf.h+0−0

File renamed without changes.

src/libtcc.crenamed from libtcc.c+6−6
@@ -40,24 +40,24 @@ ST_DATA struct TCCState *tcc_state; · 39 unmodified lines
40#include "tccelf.c"40#include "tccelf.c"
41#include "tccrun.c"41#include "tccrun.c"
42#ifdef TCC_TARGET_I38642#ifdef TCC_TARGET_I386
43#include "i386-gen.c"43#include "x86/i386-gen.c"
44#endif44#endif
45#ifdef TCC_TARGET_ARM45#ifdef TCC_TARGET_ARM
46#include "arm-gen.c"46#include "arm/arm-gen.c"
47#endif47#endif
48#ifdef TCC_TARGET_ARM6448#ifdef TCC_TARGET_ARM64
49#include "arm64-gen.c"49#include "arm/arm64-gen.c"
50#endif50#endif
51#ifdef TCC_TARGET_C6751#ifdef TCC_TARGET_C67
52#include "c67-gen.c"52#include "tms320c67/c67-gen.c"
53#endif53#endif
54#ifdef TCC_TARGET_X86_6454#ifdef TCC_TARGET_X86_64
55#include "x86_64-gen.c"55#include "x86/x86_64-gen.c"
56#endif56#endif
57#ifdef CONFIG_TCC_ASM57#ifdef CONFIG_TCC_ASM
58#include "tccasm.c"58#include "tccasm.c"
59#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_6459#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
60#include "i386-asm.c"60#include "x86/i386-asm.c"
61#endif61#endif
62#endif62#endif
63#ifdef TCC_TARGET_COFF63#ifdef TCC_TARGET_COFF
src/libtcc.hrenamed from libtcc.h+0−0

File renamed without changes.

src/stab.defrenamed from stab.def+0−0

File renamed without changes.

src/stab.hrenamed from stab.h+0−0

File renamed without changes.

src/tcc.crenamed from tcc.c+0−0

File renamed without changes.

src/tcc.hrenamed from tcc.h+5−5
@@ -293,20 +293,20 @@ · 292 unmodified lines
293 293
294#define TARGET_DEFS_ONLY294#define TARGET_DEFS_ONLY
295#ifdef TCC_TARGET_I386295#ifdef TCC_TARGET_I386
296# include "i386-gen.c"296# include "x86/i386-gen.c"
297#endif297#endif
298#ifdef TCC_TARGET_X86_64298#ifdef TCC_TARGET_X86_64
299# include "x86_64-gen.c"299# include "x86/x86_64-gen.c"
300#endif300#endif
301#ifdef TCC_TARGET_ARM301#ifdef TCC_TARGET_ARM
302# include "arm-gen.c"302# include "arm/arm-gen.c"
303#endif303#endif
304#ifdef TCC_TARGET_ARM64304#ifdef TCC_TARGET_ARM64
305# include "arm64-gen.c"305# include "arm/arm64-gen.c"
306#endif306#endif
307#ifdef TCC_TARGET_C67307#ifdef TCC_TARGET_C67
308# include "coff.h"308# include "coff.h"
309# include "c67-gen.c"309# include "tms320c67c67-gen.c"
310#endif310#endif
311#undef TARGET_DEFS_ONLY311#undef TARGET_DEFS_ONLY
312 312
src/tccasm.crenamed from tccasm.c+0−0

File renamed without changes.

src/tcccoff.crenamed from tcccoff.c+0−0

File renamed without changes.

src/tccelf.crenamed from tccelf.c+1−1
@@ -1549,7 +1549,7 @@ static int tcc_add_support(TCCState *s1, const char *filename) · 1548 unmodified lines
1549 "i386"1549 "i386"
1550 #endif1550 #endif
1551 #ifdef TCC_TARGET_X86_641551 #ifdef TCC_TARGET_X86_64
1552 "x86-64"1552 "x86_64"
1553 #endif1553 #endif
1554 #ifdef TCC_TARGET_ARM1554 #ifdef TCC_TARGET_ARM
1555 "arm"1555 "arm"
src/tccgen.crenamed from tccgen.c+0−0

File renamed without changes.

src/tcclib.hrenamed from tcclib.h+0−0

File renamed without changes.

src/tccpe.crenamed from tccpe.c+1−1
@@ -1636,7 +1636,7 @@ quit: · 1635 unmodified lines
1636 1636
1637/* ------------------------------------------------------------- */1637/* ------------------------------------------------------------- */
1638#define TINY_IMPDEF_GET_EXPORT_NAMES_ONLY1638#define TINY_IMPDEF_GET_EXPORT_NAMES_ONLY
1639#include "win32/tools/tiny_impdef.c"1639#include "../win32/tools/tiny_impdef.c"
1640 1640
1641static int pe_load_dll(TCCState *s1, const char *dllname, int fd)1641static int pe_load_dll(TCCState *s1, const char *dllname, int fd)
1642{1642{
src/tccpp.crenamed from tccpp.c+0−0

File renamed without changes.

src/tccrun.crenamed from tccrun.c+0−0

File renamed without changes.

src/tcctok.hrenamed from tcctok.h+1−1
@@ -331,5 +331,5 @@ · 330 unmodified lines
331#endif331#endif
332 332
333#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64333#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
334#include "i386-tok.h"334#include "x86/i386-tok.h"
335#endif335#endif
src/tms320c67/c67-gen.crenamed from c67-gen.c+1−1
@@ -127,7 +127,7 @@ enum { · 126 unmodified lines
127/******************************************************/127/******************************************************/
128#else /* ! TARGET_DEFS_ONLY */128#else /* ! TARGET_DEFS_ONLY */
129/******************************************************/129/******************************************************/
130#include "tcc.h"130#include "../tcc.h"
131 131
132ST_DATA const int reg_classes[NB_REGS] = {132ST_DATA const int reg_classes[NB_REGS] = {
133 /* eax */ RC_INT | RC_FLOAT | RC_EAX,133 /* eax */ RC_INT | RC_FLOAT | RC_EAX,
src/x86/i386-asm.crenamed from i386-asm.c+1−1
@@ -19,7 +19,7 @@ · 18 unmodified lines
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */20 */
21 21
22#include "tcc.h"22#include "../tcc.h"
23 23
24/* #define NB_ASM_REGS 8 */24/* #define NB_ASM_REGS 8 */
25#define MAX_OPERANDS 325#define MAX_OPERANDS 3
src/x86/i386-asm.hrenamed from i386-asm.h+0−0

File renamed without changes.

src/x86/i386-gen.crenamed from i386-gen.c+1−1
@@ -89,7 +89,7 @@ enum { · 88 unmodified lines
89/******************************************************/89/******************************************************/
90#else /* ! TARGET_DEFS_ONLY */90#else /* ! TARGET_DEFS_ONLY */
91/******************************************************/91/******************************************************/
92#include "tcc.h"92#include "../tcc.h"
93 93
94ST_DATA const int reg_classes[NB_REGS] = {94ST_DATA const int reg_classes[NB_REGS] = {
95 /* eax */ RC_INT | RC_EAX,95 /* eax */ RC_INT | RC_EAX,
src/x86/i386-tok.hrenamed from i386-tok.h+0−0

File renamed without changes.

src/x86/x86_64-asm.hrenamed from x86_64-asm.h+0−0

File renamed without changes.

src/x86/x86_64-gen.crenamed from x86_64-gen.c+1−1
@@ -136,7 +136,7 @@ enum { · 135 unmodified lines
136/******************************************************/136/******************************************************/
137#else /* ! TARGET_DEFS_ONLY */137#else /* ! TARGET_DEFS_ONLY */
138/******************************************************/138/******************************************************/
139#include "tcc.h"139#include "../tcc.h"
140#include <assert.h>140#include <assert.h>
141 141
142ST_DATA const int reg_classes[NB_REGS] = {142ST_DATA const int reg_classes[NB_REGS] = {
tests/Makefile+5−5
@@ -2,7 +2,7 @@ · 1 unmodified line
2# Tiny C Compiler Makefile - tests2# Tiny C Compiler Makefile - tests
3#3#
4 4
5TOP = ..5TOP = ../src
6include $(TOP)/Makefile6include $(TOP)/Makefile
7SRCDIR = $(top_srcdir)/tests7SRCDIR = $(top_srcdir)/tests
8VPATH = $(SRCDIR) $(top_srcdir)8VPATH = $(SRCDIR) $(top_srcdir)
@@ -60,11 +60,11 @@ ifeq ($(TARGETOS),Darwin) · 51 unmodified lines
60endif60endif
61 61
62# run local version of tcc with local libraries and includes62# run local version of tcc with local libraries and includes
63TCCFLAGS = -B$(TOP) -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/include -L$(TOP)63TCCFLAGS = -B$(TOP)/../lib -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/../include -L$(TOP)
64ifdef CONFIG_WIN3264ifdef CONFIG_WIN32
65 TCCFLAGS = -B$(top_srcdir)/win32 -I$(top_srcdir) -I$(top_srcdir)/include -L$(TOP)65 TCCFLAGS = -B$(top_srcdir)/win32 -I$(top_srcdir) -I$(top_srcdir)/../include -L$(TOP)
66endif66endif
67XTCCFLAGS = -B$(TOP) -B$(top_srcdir)/win32 -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/include67XTCCFLAGS = -B$(TOP)/../lib -B$(top_srcdir)/win32 -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/../include
68 68
69TCC = $(TOP)/tcc $(TCCFLAGS)69TCC = $(TOP)/tcc $(TCCFLAGS)
70RUN_TCC = $(NATIVE_DEFINES) -DONE_SOURCE -run $(top_srcdir)/tcc.c $(TCCFLAGS)70RUN_TCC = $(NATIVE_DEFINES) -DONE_SOURCE -run $(top_srcdir)/tcc.c $(TCCFLAGS)
@@ -73,7 +73,7 @@ DISAS = objdump -d · 2 unmodified lines
73 73
74# libtcc test74# libtcc test
75ifdef LIBTCC175ifdef LIBTCC1
76 LIBTCC1:=$(TOP)/$(LIBTCC1)76 LIBTCC1:=$(TOP)/lib/$(LIBTCC1)
77endif77endif
78 78
79all test : $(TESTS)79all test : $(TESTS)
tests/pp/Makefile+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
2# credits: 01..13.c from the pcc cpp-tests suite2# credits: 01..13.c from the pcc cpp-tests suite
3#3#
4 4
5TCC = ../../tcc5TCC = ../../src/tcc
6TESTS = $(patsubst %.c,%.test,$(wildcard *.c))6TESTS = $(patsubst %.c,%.test,$(wildcard *.c))
7 7
8all test : $(TESTS)8all test : $(TESTS)
tests/tests2/Makefile+3−3
@@ -1,4 +1,4 @@
1TOP = ../..1TOP = ../../src
2include $(TOP)/Makefile2include $(TOP)/Makefile
3 3
4# clear CFLAGS and LDFLAGS4# clear CFLAGS and LDFLAGS
@@ -6,9 +6,9 @@ CFLAGS := · 1 unmodified line
6LDFLAGS :=6LDFLAGS :=
7 7
8ifdef CONFIG_WIN328ifdef CONFIG_WIN32
9 TCCFLAGS = -B$(top_srcdir)/win32 -I$(top_srcdir)/include -L$(TOP)9 TCCFLAGS = -B$(top_srcdir)/win32 -I$(top_srcdir)/../include -L$(TOP)
10else10else
11 TCCFLAGS = -B$(TOP) -I$(top_srcdir)/include -lm11 TCCFLAGS = -B$(TOP)/../lib -I$(top_srcdir)/../include -lm
12endif12endif
13 13
14ifeq ($(TARGETOS),Darwin)14ifeq ($(TARGETOS),Darwin)
win32/tools/tiny_libmaker.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
21#include <stdio.h>21#include <stdio.h>
22#include <stdlib.h>22#include <stdlib.h>
23#include <string.h>23#include <string.h>
24#include "../../elf.h"24#include "../../src/elf.h"
25 25
26#ifdef TCC_TARGET_X86_6426#ifdef TCC_TARGET_X86_64
27# define ELFCLASSW ELFCLASS6427# define ELFCLASSW ELFCLASS64

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t