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...
This commit is contained in:
gus knight
2015-07-27 16:03:25 -04:00
committed by Augustin Cavalier
parent 694d0fdade
commit 47e06c6d4e
45 changed files with 90 additions and 91 deletions

View File

@ -2,9 +2,9 @@
# Tiny C Compiler Makefile for libtcc1.a
#
TOP = ..
TOP = ../src
include $(TOP)/Makefile
VPATH = $(top_srcdir)/lib $(top_srcdir)/win32/lib
VPATH = $(top_srcdir)/../lib $(top_srcdir)/../win32/lib
ifndef TARGET # native library
ifdef CONFIG_WIN64
@ -37,7 +37,7 @@ endif
BCHECK_O = bcheck.o
DIR = $(TARGET)
native : ../libtcc1.a
native : $(DIR)/libtcc1.a
cross : $(DIR)/libtcc1.a
native : TCC = $(TOP)/tcc$(EXESUF)
@ -61,26 +61,26 @@ CFLAGS := $(filter-out -fstack-protector-strong,$(CFLAGS))
ifeq "$(TARGET)" "i386-win"
OBJ = $(addprefix $(DIR)/,$(WIN32_O))
TGT = -DTCC_TARGET_I386 -DTCC_TARGET_PE
XCC ?= $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include
XCC ?= $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/../include
XAR ?= $(DIR)/tiny_libmaker$(EXESUF)
PICFLAGS =
else
ifeq "$(TARGET)" "x86_64-win"
OBJ = $(addprefix $(DIR)/,$(WIN64_O))
TGT = -DTCC_TARGET_X86_64 -DTCC_TARGET_PE
XCC = $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/include
XCC = $(TCC) -B$(top_srcdir)/win32 -I$(top_srcdir)/../include
XAR ?= $(DIR)/tiny_libmaker$(EXESUF)
PICFLAGS =
else
ifeq "$(TARGET)" "i386"
OBJ = $(addprefix $(DIR)/,$(I386_O))
TGT = -DTCC_TARGET_I386
XCC ?= $(TCC) -B$(TOP)
XCC ?= $(TCC) -B$(TOP) -I$(top_srcdir)/../include
else
ifeq "$(TARGET)" "x86_64"
OBJ = $(addprefix $(DIR)/,$(X86_64_O))
TGT = -DTCC_TARGET_X86_64
XCC ?= $(TCC) -B$(TOP)
XCC ?= $(TCC) -B$(TOP) -I$(top_srcdir)/../include
else
ifeq "$(TARGET)" "arm"
OBJ = $(addprefix $(DIR)/,$(ARM_O))
@ -110,7 +110,7 @@ endif
XAR ?= $(AR)
$(DIR)/libtcc1.a ../libtcc1.a : $(OBJ) $(XAR)
$(DIR)/libtcc1.a : $(OBJ) $(XAR)
$(XAR) rcs $@ $(OBJ)
$(DIR)/%.o : %.c
$(XCC) -c $< -o $@ $(XFLAGS)