forked from xboot/libcg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1a950e2
Showing
15 changed files
with
7,796 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> | ||
<storageModule moduleId="org.eclipse.cdt.core.settings"> | ||
<cconfiguration id="0.1686534839"> | ||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1686534839" moduleId="org.eclipse.cdt.core.settings" name="Default"> | ||
<externalSettings/> | ||
<extensions> | ||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/> | ||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
</extensions> | ||
</storageModule> | ||
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> | ||
<configuration buildProperties="" description="" id="0.1686534839" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg"> | ||
<folderInfo id="0.1686534839." name="/" resourcePath=""> | ||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1673718044" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain"> | ||
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1673718044.1338026394" name=""/> | ||
<builder id="org.eclipse.cdt.build.core.settings.default.builder.1841607618" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/> | ||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.101797942" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/> | ||
<tool id="org.eclipse.cdt.build.core.settings.holder.1502939963" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder"> | ||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1162766966" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/> | ||
</tool> | ||
<tool id="org.eclipse.cdt.build.core.settings.holder.500264934" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder"> | ||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1706268010" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/> | ||
</tool> | ||
<tool id="org.eclipse.cdt.build.core.settings.holder.1876752967" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder"> | ||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.534990016" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/> | ||
</tool> | ||
</toolChain> | ||
</folderInfo> | ||
</configuration> | ||
</storageModule> | ||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> | ||
</cconfiguration> | ||
</storageModule> | ||
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> | ||
<project id="libcg.null.1138639105" name="libcg"/> | ||
</storageModule> | ||
<storageModule moduleId="scannerConfiguration"> | ||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> | ||
<scannerConfigBuildInfo instanceId="0.1920460560"> | ||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> | ||
</scannerConfigBuildInfo> | ||
<scannerConfigBuildInfo instanceId="0.1742877501"> | ||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> | ||
</scannerConfigBuildInfo> | ||
<scannerConfigBuildInfo instanceId="0.1686534839"> | ||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> | ||
</scannerConfigBuildInfo> | ||
</storageModule> | ||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> | ||
</cproject> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# Normal rules | ||
# | ||
*.map | ||
*.elf | ||
*.bin | ||
*.png | ||
*.rej | ||
*.orig | ||
*.d | ||
*.o | ||
*.a | ||
*.so | ||
*~ | ||
|
||
# | ||
# Generated files | ||
# | ||
/.vscode/ | ||
/.settings/ | ||
/cg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>graphic</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> | ||
<triggers>clean,full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> | ||
<triggers>full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.cdt.core.cnature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> | ||
<nature>org.eclipse.cdt.core.ccnature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 jiang jianjun | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# | ||
# Makefile for module. | ||
# | ||
|
||
CROSS ?= | ||
|
||
|
||
AS := $(CROSS)gcc -x assembler-with-cpp | ||
CC := $(CROSS)gcc | ||
CXX := $(CROSS)g++ | ||
LD := $(CROSS)ld | ||
AR := $(CROSS)ar | ||
OC := $(CROSS)objcopy | ||
OD := $(CROSS)objdump | ||
RM := rm -fr | ||
|
||
|
||
ASFLAGS := -g -ggdb -Wall -O3 -ffunction-sections -fdata-sections -ffreestanding -std=gnu99 | ||
CFLAGS := -g -ggdb -Wall -O3 -ffunction-sections -fdata-sections -ffreestanding -std=gnu99 | ||
CXXFLAGS := -g -ggdb -Wall -O3 -ffunction-sections -fdata-sections -ffreestanding -std=gnu99 | ||
LDFLAGS := -Wl,-gc-sections | ||
ARFLAGS := -rcs | ||
OCFLAGS := -v -O binary | ||
ODFLAGS := | ||
MCFLAGS := | ||
|
||
LIBDIRS := | ||
LIBS := -lm | ||
|
||
INCDIRS := -I . | ||
SRCDIRS := . | ||
|
||
SFILES := $(foreach dir, $(SRCDIRS), $(wildcard $(dir)/*.S)) | ||
CFILES := $(foreach dir, $(SRCDIRS), $(wildcard $(dir)/*.c)) | ||
CPPFILES := $(foreach dir, $(SRCDIRS), $(wildcard $(dir)/*.cpp)) | ||
|
||
SDEPS := $(patsubst %, %, $(SFILES:.S=.o.d)) | ||
CDEPS := $(patsubst %, %, $(CFILES:.c=.o.d)) | ||
CPPDEPS := $(patsubst %, %, $(CPPFILES:.cpp=.o.d)) | ||
DEPS := $(SDEPS) $(CDEPS) $(CPPDEPS) | ||
|
||
SOBJS := $(patsubst %, %, $(SFILES:.S=.o)) | ||
COBJS := $(patsubst %, %, $(CFILES:.c=.o)) | ||
CPPOBJS := $(patsubst %, %, $(CPPFILES:.cpp=.o)) | ||
OBJS := $(SOBJS) $(COBJS) $(CPPOBJS) | ||
|
||
OBJDIRS := $(patsubst %, %, $(SRCDIRS)) | ||
NAME := cg | ||
VPATH := $(OBJDIRS) | ||
|
||
.PHONY: all clean | ||
|
||
all : $(NAME) | ||
|
||
$(NAME) : $(OBJS) | ||
@echo [LD] Linking $@ | ||
@$(CC) $(LDFLAGS) $(LIBDIRS) -Wl,--cref,-Map=$@.map $^ -o $@ $(LIBS) -static | ||
|
||
$(SOBJS) : %.o : %.S | ||
@echo [AS] $< | ||
@$(AS) $(ASFLAGS) $(INCDIRS) -c $< -o $@ | ||
@$(AS) $(ASFLAGS) -MD -MP -MF $@.d $(INCDIRS) -c $< -o $@ | ||
|
||
$(COBJS) : %.o : %.c | ||
@echo [CC] $< | ||
@$(CC) $(CFLAGS) $(INCDIRS) -c $< -o $@ | ||
@$(CC) $(CFLAGS) -MD -MP -MF $@.d $(INCDIRS) -c $< -o $@ | ||
|
||
$(CPPOBJS) : %.o : %.cpp | ||
@echo [CXX] $< | ||
@$(CXX) $(CXXFLAGS) $(INCDIRS) -c $< -o $@ | ||
@$(CXX) $(CXXFLAGS) -MD -MP -MF $@.d $(INCDIRS) -c $< -o $@ | ||
|
||
clean: | ||
@$(RM) $(DEPS) $(OBJS) $(NAME).map $(NAME) *.png *~ | ||
@echo Clean complete. |
Oops, something went wrong.