http and lots of formats
This commit is contained in:
1
appleauth/auth.cpp
Normal file
1
appleauth/auth.cpp
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
74
appleauth/build.cpp
Normal file
74
appleauth/build.cpp
Normal file
@@ -0,0 +1,74 @@
|
||||
#include "helper.h"
|
||||
#include "c.h"
|
||||
#include "ld.h"
|
||||
#include "tier1/utlstring.h"
|
||||
#include "tier1/commandline.h"
|
||||
|
||||
ADD_DEPENDENCY_BUILD_FILE(tier0, "../tier0/build.cpp")
|
||||
ADD_DEPENDENCY_BUILD_FILE(tier1, "../tier1/build.cpp")
|
||||
ADD_DEPENDENCY_BUILD_FILE(tier2, "../tier2/build.cpp")
|
||||
ADD_DEPENDENCY_BUILD_FILE(http, "../http/build.cpp")
|
||||
|
||||
DECLARE_BUILD_STAGE(appleauth)
|
||||
{
|
||||
CProject_t compileProject = {};
|
||||
LinkProject_t ldProject = {};
|
||||
|
||||
compileProject.m_szName = "appleauth";
|
||||
compileProject.files = {
|
||||
"auth.cpp"
|
||||
};
|
||||
compileProject.includeDirectories = {"../public"};
|
||||
compileProject.bFPIC = true;
|
||||
ldProject = ccompiler->Compile(&compileProject);
|
||||
ldProject.objects.AppendTail({GET_PROJECT_LIBRARY(tier1, "tier1")});
|
||||
ldProject.objects.AppendTail({GET_PROJECT_LIBRARY(tier2, "tier2")});
|
||||
ldProject.linkType = ELINK_DYNAMIC_LIBRARY;
|
||||
|
||||
CUtlString szOutputProject = linker->Link(&ldProject);
|
||||
|
||||
ADD_OUTPUT_OBJECT("appleauth", szOutputProject)
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
DECLARE_BUILD_STAGE(appleauth_test)
|
||||
{
|
||||
|
||||
CProject_t compileProject = {};
|
||||
LinkProject_t ldProject = {};
|
||||
|
||||
filesystem2->MakeDirectory("build");
|
||||
filesystem2->CopyFile("build",GET_PROJECT_LIBRARY(funnyhttp, "funnyhttp"));
|
||||
filesystem2->CopyFile("build",GET_PROJECT_LIBRARY(appleauth, "appleauth"));
|
||||
filesystem2->CopyFile("build",GET_PROJECT_LIBRARY(tier0, "tier0"));
|
||||
|
||||
compileProject.m_szName = "appleauth";
|
||||
compileProject.files = {
|
||||
"test.cpp"
|
||||
};
|
||||
compileProject.includeDirectories = {"../public"};
|
||||
compileProject.bFPIC = true;
|
||||
ldProject = ccompiler->Compile(&compileProject);
|
||||
ldProject.libraryObjects = {
|
||||
GET_PROJECT_LIBRARY(tier1, "tier1"),
|
||||
GET_PROJECT_LIBRARY(tier2, "tier2"),
|
||||
};
|
||||
ldProject.libraries = {
|
||||
"tier0",
|
||||
};
|
||||
ldProject.libraryDirectories = {
|
||||
"build",
|
||||
};
|
||||
ldProject.linkType = ELINK_EXECUTABLE;
|
||||
CUtlString szOutputDir = linker->Link(&ldProject);
|
||||
|
||||
filesystem2->CopyFile("build",szOutputDir);
|
||||
|
||||
|
||||
CUtlVector<CUtlString> args = {};
|
||||
runner->Run("build/appleauth", args);
|
||||
runner->Wait();
|
||||
|
||||
return 0;
|
||||
};
|
||||
0
appleauth/test.cpp
Normal file
0
appleauth/test.cpp
Normal file
Reference in New Issue
Block a user