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
55 *.log
66 tcc_g
77 tcc
8−/*-tcc
8+/src/*-tcc
99 tc2.c
1010 doc
1111 tc3s.c
@@ -63,7 +63,7 @@ lib/i386-win32 · 51 unmodified lines
6363 lib/arm
6464 lib/arm64
6565 tcc-doc.info
66−conftest*
66+conftest*!conftest.c
6767 tiny_libmaker
6868 *.dSYM
6969 *~
CMakeLists.txt+25−26
@@ -85,14 +85,14 @@ endif() · 84 unmodified lines
8585
8686 file(STRINGS "VERSION" TCC_VERSION)
8787 list(GET TCC_VERSION 0 TCC_VERSION)
88−include_directories(${CMAKE_BINARY_DIR})
89−configure_file(config.h.in config.h)
90−configure_file(config.texi.in config.texi)
88+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/)
89+configure_file(src/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/config.h)
90+configure_file(docs/config.texi.in ${CMAKE_CURRENT_SOURCE_DIR}/docs/config.texi)
9191
9292 # Utility variables
93−set(I386_SOURCES i386-gen.c i386-asm.c i386-asm.h i386-tok.h)
94−set(X86_64_SOURCES x86_64-gen.c i386-asm.c x86_64-asm.h)
95−set(ARM_SOURCES arm_gen.c)
93+set(I386_SOURCES src/x86/i386-gen.c src/x86/i386-asm.c src/x86/i386-asm.h src/x86/i386-tok.h)
94+set(X86_64_SOURCES src/x86/x86_64-gen.c src/x86/i386-asm.c src/x86/x86_64-asm.h)
95+set(ARM_SOURCES src/arm/arm_gen.c)
9696
9797 set(LIBTCC1_I386_SOURCES lib/alloca86.S lib/alloca86-bt.S)
9898 set(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
157157
158158 if (TCC_BUILD_NATIVE)
159159 add_library(libtcc
160− libtcc.c
161− tccpp.c
162− tccgen.c
163− tccelf.c
164− tccasm.c
165− tccrun.c
166− tcc.h
167− libtcc.h
168− tcctok.h
160+ src/libtcc.c
161+ src/tccpp.c
162+ src/tccgen.c
163+ src/tccelf.c
164+ src/tccasm.c
165+ src/tccrun.c
166+ src/tcc.h
167+ src/libtcc.h
168+ src/tcctok.h
169169 ${tcc_sources}
170170 )
171171 set_target_properties(libtcc PROPERTIES OUTPUT_NAME tcc PREFIX lib)
172172 if(WIN32)
173173 set_target_properties(libtcc PROPERTIES LINK_FLAGS "-Wl,--output-def,libtcc.def")
174174 endif()
175− add_executable(tcc tcc.c)
175+ add_executable(tcc src/tcc.c)
176176 target_link_libraries(tcc libtcc)
177177 if(NOT WIN32)
178178 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
185185 endif()
186186 endif()
187187 elseif(${cross_enabled})
188− add_executable(${cross_name}-tcc tcc.c)
188+ add_executable(${cross_name}-tcc src/tcc.c)
189189 set_target_properties(${cross_name}-tcc PROPERTIES COMPILE_DEFINITIONS "ONE_SOURCE;${definitions}")
190190 install(TARGETS ${cross_name}-tcc RUNTIME DESTINATION ${EXE_PATH})
191191
@@ -197,17 +197,17 @@ endmacro() · 5 unmodified lines
197197
198198 make_tcc("Win32" i386-w64-mingw32 TCC_BUILD_WIN32
199199 "TCC_TARGET_I386;TCC_TARGET_PE"
200− "${I386_SOURCES};tccpe.c"
200+ "${I386_SOURCES};src/tccpe.c"
201201 tiny_libmaker_32 "${LIBTCC1_I386_SOURCES};${LIBTCC1_WIN_SOURCES}" "win32/include;win32/include/winapi"
202202 )
203203 make_tcc("Win64" x86_64-w64-mingw32 TCC_BUILD_WIN64
204204 "TCC_TARGET_X86_64;TCC_TARGET_PE"
205− "${X86_64_SOURCES};tccpe.c"
205+ "${X86_64_SOURCES};src/tccpe.c"
206206 tiny_libmaker_64 "lib/alloca86_64.S;${LIBTCC1_WIN_SOURCES}" "win32/include;win32/include/winapi"
207207 )
208208 make_tcc("WinCE" arm-wince-mingw32ce TCC_BUILD_WINCE
209209 "TCC_TARGET_ARM;TCC_ARM_VERSION=${TCC_ARM_VERSION};TCC_TARGET_PE"
210− "${ARM_SOURCES};tccpe.c"
210+ "${ARM_SOURCES};src/tccpe.c"
211211 "" "" ""
212212 )
213213 make_tcc("i386" i386-linux-gnu TCC_BUILD_I386
@@ -248,7 +248,7 @@ make_tcc("" arm-linux-gnu TCC_BUILD_ARM_VFP · 34 unmodified lines
248248 )
249249 make_tcc("" c67 TCC_BUILD_C67
250250 TCC_TARGET_C67
251− "c67-gen.c;tcccoff.c"
251+ "c67-gen.c;src/tcccoff.c"
252252 "" "" ""
253253 )
254254
@@ -257,14 +257,14 @@ add_subdirectory(tests) · 2 unmodified lines
257257 find_program(MAKEINFO NAMES makeinfo PATHS C:/MinGW/MSYS/1.0/bin)
258258 if(MAKEINFO)
259259 add_custom_command(OUTPUT tcc-doc.html
260− COMMAND ${MAKEINFO} --no-split --html -o tcc-doc.html ${CMAKE_CURRENT_SOURCE_DIR}/tcc-doc.texi
261− DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tcc-doc.texi
260+ COMMAND ${MAKEINFO} --no-split --html -o tcc-doc.html ${CMAKE_CURRENT_SOURCE_DIR}/docs/tcc-doc.texi
261+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/docs/tcc-doc.texi
262262 )
263263 set(TCC_DOC_FILES tcc-doc.html)
264264 if(NOT WIN32)
265265 add_custom_command(OUTPUT tcc-doc.info
266− COMMAND ${MAKEINFO} -o tcc-doc.info ${CMAKE_CURRENT_SOURCE_DIR}/tcc-doc.texi
267− DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tcc-doc.texi
266+ COMMAND ${MAKEINFO} -o tcc-doc.info ${CMAKE_CURRENT_SOURCE_DIR}/docs/tcc-doc.texi
267+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/docs/tcc-doc.texi
268268 )
269269 set(TCC_DOC_FILES ${TCC_DOC_FILES} tcc-doc.info)
270270 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tcc-doc.info DESTINATION share/info)
@@ -290,4 +290,3 @@ else() · 19 unmodified lines
290290 install(DIRECTORY win32/include/ DESTINATION lib/tcc/win32/include)
291291 install(DIRECTORY include/ DESTINATION lib/tcc/win32/include)
292292 endif()
293−
configure+4−4
@@ -337,7 +337,7 @@ strip="${cross_prefix}${strip}" · 336 unmodified lines
337337 CONFTEST=./conftest$EXESUF
338338
339339 if test -z "$cross_prefix" ; then
340− if ! $cc -o $CONFTEST $source_path/conftest.c 2>/dev/null ; then
340+ if ! $cc -o $CONFTEST $source_path/src/conftest.c 2>/dev/null ; then
341341 echo "configure: error: '$cc' failed to compile conftest.c."
342342 else
343343 bigendian="$($CONFTEST bigendian)"
@@ -560,7 +560,7 @@ fi · 216 unmodified lines
560560 version=`head $source_path/VERSION`
561561 echo "VERSION=$version" >>config.mak
562562 echo "#define TCC_VERSION \"$version\"" >> $TMPH
563−echo "@set VERSION $version" > config.texi
563+echo "@set VERSION $version" >docs/config.texi
564564 echo "SRC_PATH=$source_path" >>config.mak
565565
566566 if test "$source_path_used" = "yes" ; then
@@ -573,9 +573,9 @@ else · 6 unmodified lines
573573 fi
574574 echo 'top_builddir=$(TOP)' >>config.mak
575575
576−diff $TMPH config.h >/dev/null 2>&1
576+diff $TMPH src/config.h >/dev/null 2>&1
577577 if test $? -ne 0 ; then
578− mv -f $TMPH config.h
578+ mv -f $TMPH src/config.h
579579 else
580580 echo "config.h is unchanged"
581581 fi
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
22 # Tiny C Compiler Makefile for libtcc1.a
33 #
44
5−TOP = ..
5+TOP = ../src
66 include $(TOP)/Makefile
7−VPATH = $(top_srcdir)/lib $(top_srcdir)/win32/lib
7+VPATH = $(top_srcdir)/../lib $(top_srcdir)/../win32/lib
88
99 ifndef TARGET # native library
1010 ifdef CONFIG_WIN64
@@ -37,7 +37,7 @@ endif · 26 unmodified lines
3737 BCHECK_O = bcheck.o
3838 DIR = $(TARGET)
3939
40−native : ../libtcc1.a
40+native : $(DIR)/libtcc1.a
4141 cross : $(DIR)/libtcc1.a
4242
4343 native : TCC = $(TOP)/tcc$(EXESUF)
@@ -61,26 +61,26 @@ CFLAGS := $(filter-out -fstack-protector-strong,$(CFLAGS)) · 17 unmodified lines
6161 ifeq "$(TARGET)" "i386-win"
6262 OBJ = $(addprefix $(DIR)/,$(WIN32_O))
6363 TGT = -DTCC_TARGET_I386 -DTCC_TARGET_PE
64− XCC ?= $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include
64+ XCC ?= $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/../include
6565 XAR ?= $(DIR)/tiny_libmaker$(EXESUF)
6666 PICFLAGS =
6767 else
6868 ifeq "$(TARGET)" "x86_64-win"
6969 OBJ = $(addprefix $(DIR)/,$(WIN64_O))
7070 TGT = -DTCC_TARGET_X86_64 -DTCC_TARGET_PE
71− XCC = $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include
71+ XCC = $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/../include
7272 XAR ?= $(DIR)/tiny_libmaker$(EXESUF)
7373 PICFLAGS =
7474 else
7575 ifeq "$(TARGET)" "i386"
7676 OBJ = $(addprefix $(DIR)/,$(I386_O))
7777 TGT = -DTCC_TARGET_I386
78− XCC ?= $(TCC) -B$(TOP)
78+ XCC ?= $(TCC) -B$(TOP) -I$(top_srcdir)/../include
7979 else
8080 ifeq "$(TARGET)" "x86_64"
8181 OBJ = $(addprefix $(DIR)/,$(X86_64_O))
8282 TGT = -DTCC_TARGET_X86_64
83− XCC ?= $(TCC) -B$(TOP)
83+ XCC ?= $(TCC) -B$(TOP) -I$(top_srcdir)/../include
8484 else
8585 ifeq "$(TARGET)" "arm"
8686 OBJ = $(addprefix $(DIR)/,$(ARM_O))
@@ -110,7 +110,7 @@ endif · 23 unmodified lines
110110
111111 XAR ?= $(AR)
112112
113−$(DIR)/libtcc1.a ../libtcc1.a : $(OBJ) $(XAR)
113+$(DIR)/libtcc1.a : $(OBJ) $(XAR)
114114 $(XAR) rcs $@ $(OBJ)
115115 $(DIR)/%.o : %.c
116116 $(XCC) -c $< -o $@ $(XFLAGS)
src/Makefilerenamed from Makefile+21−21
@@ -3,7 +3,7 @@ · 2 unmodified lines
33 #
44
55 TOP ?= .
6−include $(TOP)/config.mak
6+include $(TOP)/../config.mak
77 VPATH = $(top_srcdir)
88
99 CPPFLAGS += -I$(TOP) # for config.h
@@ -113,14 +113,14 @@ endif · 103 unmodified lines
113113
114114 CORE_FILES = tcc.c libtcc.c tccpp.c tccgen.c tccelf.c tccasm.c tccrun.c
115115 CORE_FILES += tcc.h config.h libtcc.h tcctok.h
116−I386_FILES = $(CORE_FILES) i386-gen.c i386-asm.c i386-asm.h i386-tok.h
117−WIN32_FILES = $(CORE_FILES) i386-gen.c i386-asm.c i386-asm.h i386-tok.h tccpe.c
118−WIN64_FILES = $(CORE_FILES) x86_64-gen.c i386-asm.c x86_64-asm.h tccpe.c
119−WINCE_FILES = $(CORE_FILES) arm-gen.c tccpe.c
120−X86_64_FILES = $(CORE_FILES) x86_64-gen.c i386-asm.c x86_64-asm.h
121−ARM_FILES = $(CORE_FILES) arm-gen.c
122−ARM64_FILES = $(CORE_FILES) arm64-gen.c
123−C67_FILES = $(CORE_FILES) c67-gen.c tcccoff.c
116+I386_FILES = $(CORE_FILES) x86/i386-gen.c x86/i386-asm.c x86/i386-asm.h x86/i386-tok.h
117+WIN32_FILES = $(CORE_FILES) x86/i386-gen.c x86/i386-asm.c x86/i386-asm.h x86/i386-tok.h tccpe.c
118+WIN64_FILES = $(CORE_FILES) x86/x86_64-gen.c x86/i386-asm.c x86/x86_64-asm.h tccpe.c
119+WINCE_FILES = $(CORE_FILES) arm/arm-gen.c tccpe.c
120+X86_64_FILES = $(CORE_FILES) x86/x86_64-gen.c x86/i386-asm.c x86/x86_64-asm.h
121+ARM_FILES = $(CORE_FILES) arm/arm-gen.c
122+ARM64_FILES = $(CORE_FILES) arm/arm64-gen.c
123+C67_FILES = $(CORE_FILES) tms320c67/c67-gen.c tcccoff.c
124124
125125 ifdef CONFIG_WIN64
126126 PROGS+=tiny_impdef$(EXESUF) tiny_libmaker$(EXESUF)
@@ -249,18 +249,18 @@ libtcc.dll libtcc.def libtcc.a: $(LIBTCC_OBJ) · 122 unmodified lines
249249 endif
250250
251251 # windows utilities
252−tiny_impdef$(EXESUF): win32/tools/tiny_impdef.c
252+tiny_impdef$(EXESUF): ../win32/tools/tiny_impdef.c
253253 $(CC) -o $@ $< $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
254−tiny_libmaker$(EXESUF): win32/tools/tiny_libmaker.c
254+tiny_libmaker$(EXESUF): ../win32/tools/tiny_libmaker.c
255255 $(CC) -o $@ $< $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
256256
257257 # TinyCC runtime libraries
258258 libtcc1.a : FORCE
259− $(MAKE) -C lib native
259+ $(MAKE) -C ../lib native
260260 if test ! -d $(ARCH); then mkdir $(ARCH); fi
261261 if test ! -L $(ARCH)/$@; then ln -sf ../$@ $(ARCH)/$@; fi
262262 lib/%/libtcc1.a : FORCE $(PROGS_CROSS)
263− $(MAKE) -C lib cross TARGET=$*
263+ $(MAKE) -C ../lib cross TARGET=$*
264264
265265 FORCE:
266266
@@ -360,21 +360,21 @@ uninstall: · 93 unmodified lines
360360 endif
361361
362362 # documentation and man page
363−tcc-doc.html: tcc-doc.texi
363+tcc-doc.html: ../docs/tcc-doc.texi
364364 -makeinfo --no-split --html --number-sections -o $@ $<
365365
366−tcc.1: tcc-doc.texi
366+tcc.1: ../docs/tcc-doc.texi
367367 -$(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 > $@
369369
370−tcc-doc.info: tcc-doc.texi
370+tcc-doc.info: ../docs/tcc-doc.texi
371371 -makeinfo $<
372372
373373 # in tests subdir
374374 export LIBTCC1
375375
376376 %est:
377− $(MAKE) -C tests $@ 'PROGS_CROSS=$(PROGS_CROSS)'
377+ $(MAKE) -C ../tests $@ 'PROGS_CROSS=$(PROGS_CROSS)'
378378
379379 clean:
380380 rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.so* *.out *.log \
@@ -384,9 +384,9 @@ ifeq ($(HOST_OS),Linux) · 3 unmodified lines
384384 -rm -r ./C:
385385 endif
386386 -rm *-tcc$(EXESUF)
387− $(MAKE) -C tests $@
387+ $(MAKE) -C ../tests $@
388388 ifneq ($(LIBTCC1),)
389− $(MAKE) -C lib $@
389+ $(MAKE) -C ../lib $@
390390 endif
391391
392392 distclean: clean
@@ -404,7 +404,7 @@ TAGS: · 11 unmodified lines
404404
405405 # create release tarball from *current* git branch (including tcc-doc.html
406406 # and converting two files to CRLF)
407−TCC-VERSION := tcc-$(shell cat $(top_srcdir)/VERSION)
407+TCC-VERSION := tcc-$(shell cat $(top_srcdir)/../VERSION)
408408 tar: tcc-doc.html
409409 mkdir $(TCC-VERSION)
410410 ( 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
151151 /******************************************************/
152152 #else /* ! TARGET_DEFS_ONLY */
153153 /******************************************************/
154−#include "tcc.h"
154+#include "../tcc.h"
155155
156156 enum float_abi float_abi;
157157
src/arm/arm64-gen.crenamed from arm64-gen.c+1−1
@@ -58,7 +58,7 @@ typedef int RegArgs; · 57 unmodified lines
5858 /******************************************************/
5959 #else /* ! TARGET_DEFS_ONLY */
6060 /******************************************************/
61−#include "tcc.h"
61+#include "../tcc.h"
6262 #include <assert.h>
6363
6464 ST_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
4040 #include "tccelf.c"
4141 #include "tccrun.c"
4242 #ifdef TCC_TARGET_I386
43−#include "i386-gen.c"
43+#include "x86/i386-gen.c"
4444 #endif
4545 #ifdef TCC_TARGET_ARM
46−#include "arm-gen.c"
46+#include "arm/arm-gen.c"
4747 #endif
4848 #ifdef TCC_TARGET_ARM64
49−#include "arm64-gen.c"
49+#include "arm/arm64-gen.c"
5050 #endif
5151 #ifdef TCC_TARGET_C67
52−#include "c67-gen.c"
52+#include "tms320c67/c67-gen.c"
5353 #endif
5454 #ifdef TCC_TARGET_X86_64
55−#include "x86_64-gen.c"
55+#include "x86/x86_64-gen.c"
5656 #endif
5757 #ifdef CONFIG_TCC_ASM
5858 #include "tccasm.c"
5959 #if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
60−#include "i386-asm.c"
60+#include "x86/i386-asm.c"
6161 #endif
6262 #endif
6363 #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
293293
294294 #define TARGET_DEFS_ONLY
295295 #ifdef TCC_TARGET_I386
296−# include "i386-gen.c"
296+# include "x86/i386-gen.c"
297297 #endif
298298 #ifdef TCC_TARGET_X86_64
299−# include "x86_64-gen.c"
299+# include "x86/x86_64-gen.c"
300300 #endif
301301 #ifdef TCC_TARGET_ARM
302−# include "arm-gen.c"
302+# include "arm/arm-gen.c"
303303 #endif
304304 #ifdef TCC_TARGET_ARM64
305−# include "arm64-gen.c"
305+# include "arm/arm64-gen.c"
306306 #endif
307307 #ifdef TCC_TARGET_C67
308308 # include "coff.h"
309−# include "c67-gen.c"
309+# include "tms320c67c67-gen.c"
310310 #endif
311311 #undef TARGET_DEFS_ONLY
312312
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
15491549 "i386"
15501550 #endif
15511551 #ifdef TCC_TARGET_X86_64
1552− "x86-64"
1552+ "x86_64"
15531553 #endif
15541554 #ifdef TCC_TARGET_ARM
15551555 "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
16361636
16371637 /* ------------------------------------------------------------- */
16381638 #define TINY_IMPDEF_GET_EXPORT_NAMES_ONLY
1639−#include "win32/tools/tiny_impdef.c"
1639+#include "../win32/tools/tiny_impdef.c"
16401640
16411641 static int pe_load_dll(TCCState *s1, const char *dllname, int fd)
16421642 {
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
331331 #endif
332332
333333 #if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
334−#include "i386-tok.h"
334+#include "x86/i386-tok.h"
335335 #endif
src/tms320c67/c67-gen.crenamed from c67-gen.c+1−1
@@ -127,7 +127,7 @@ enum { · 126 unmodified lines
127127 /******************************************************/
128128 #else /* ! TARGET_DEFS_ONLY */
129129 /******************************************************/
130−#include "tcc.h"
130+#include "../tcc.h"
131131
132132 ST_DATA const int reg_classes[NB_REGS] = {
133133 /* 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
1919 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2020 */
2121
22−#include "tcc.h"
22+#include "../tcc.h"
2323
2424 /* #define NB_ASM_REGS 8 */
2525 #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
8989 /******************************************************/
9090 #else /* ! TARGET_DEFS_ONLY */
9191 /******************************************************/
92−#include "tcc.h"
92+#include "../tcc.h"
9393
9494 ST_DATA const int reg_classes[NB_REGS] = {
9595 /* 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
136136 /******************************************************/
137137 #else /* ! TARGET_DEFS_ONLY */
138138 /******************************************************/
139−#include "tcc.h"
139+#include "../tcc.h"
140140 #include <assert.h>
141141
142142 ST_DATA const int reg_classes[NB_REGS] = {
tests/Makefile+5−5
@@ -2,7 +2,7 @@ · 1 unmodified line
22 # Tiny C Compiler Makefile - tests
33 #
44
5−TOP = ..
5+TOP = ../src
66 include $(TOP)/Makefile
77 SRCDIR = $(top_srcdir)/tests
88 VPATH = $(SRCDIR) $(top_srcdir)
@@ -60,11 +60,11 @@ ifeq ($(TARGETOS),Darwin) · 51 unmodified lines
6060 endif
6161
6262 # run local version of tcc with local libraries and includes
63−TCCFLAGS = -B$(TOP) -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/include -L$(TOP)
63+TCCFLAGS = -B$(TOP)/../lib -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/../include -L$(TOP)
6464 ifdef 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)
6666 endif
67−XTCCFLAGS = -B$(TOP) -B$(top_srcdir)/win32 -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/include
67+XTCCFLAGS = -B$(TOP)/../lib -B$(top_srcdir)/win32 -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/../include
6868
6969 TCC = $(TOP)/tcc $(TCCFLAGS)
7070 RUN_TCC = $(NATIVE_DEFINES) -DONE_SOURCE -run $(top_srcdir)/tcc.c $(TCCFLAGS)
@@ -73,7 +73,7 @@ DISAS = objdump -d · 2 unmodified lines
7373
7474 # libtcc test
7575 ifdef LIBTCC1
76− LIBTCC1:=$(TOP)/$(LIBTCC1)
76+ LIBTCC1:=$(TOP)/lib/$(LIBTCC1)
7777 endif
7878
7979 all test : $(TESTS)
tests/pp/Makefile+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 # credits: 01..13.c from the pcc cpp-tests suite
33 #
44
5−TCC = ../../tcc
5+TCC = ../../src/tcc
66 TESTS = $(patsubst %.c,%.test,$(wildcard *.c))
77
88 all test : $(TESTS)
tests/tests2/Makefile+3−3
@@ -1,4 +1,4 @@
1−TOP = ../..
1+TOP = ../../src
22 include $(TOP)/Makefile
33
44 # clear CFLAGS and LDFLAGS
@@ -6,9 +6,9 @@ CFLAGS := · 1 unmodified line
66 LDFLAGS :=
77
88 ifdef 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)
1010 else
11− TCCFLAGS = -B$(TOP) -I$(top_srcdir)/include -lm
11+ TCCFLAGS = -B$(TOP)/../lib -I$(top_srcdir)/../include -lm
1212 endif
1313
1414 ifeq ($(TARGETOS),Darwin)
win32/tools/tiny_libmaker.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
2121 #include <stdio.h>
2222 #include <stdlib.h>
2323 #include <string.h>
24−#include "../../elf.h"
24+#include "../../src/elf.h"
2525
2626 #ifdef TCC_TARGET_X86_64
2727 # 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