No deps. Windows nmake build
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
# This is the NMake shim for Windows (WIP)
|
# This is the NMake shim for Windows (WIP)
|
||||||
|
# Example: $Env:WITH_ZLIB='0'; $ENV:WITH_LTO='0'; $Env:CC='clang'; $ENV:CFLAGS='-I C:\vcpkg\installed\x64-windows\include'; $ENV:LDFLAGS='-L C:\vcpkg\installed\x64-windows\lib'; $ENV:CXX='clang++'; $ENV:EXEC_SUFFIX='.exe'; $ENV:WITH_LIBUV='1'; nmake
|
||||||
|
|
||||||
examples: default
|
examples: default
|
||||||
.\build.exe examples || .\a.exe examples
|
.\build.exe examples || .\a.exe examples
|
||||||
@@ -13,5 +14,7 @@ all: default
|
|||||||
.\build.exe all || .\a.exe all
|
.\build.exe all || .\a.exe all
|
||||||
|
|
||||||
default:
|
default:
|
||||||
make -C uSockets
|
cd uSockets
|
||||||
|
$(CC) $(CFLAGS) -DLIBUS_NO_SSL -std=c11 -Isrc -O3 -c src/*.c src/eventing/*.c src/crypto/*.c
|
||||||
|
cd ..
|
||||||
$(CC) build.c
|
$(CC) build.c
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ int main(int argc, char **argv) {
|
|||||||
char *LDFLAGS = strcpy(calloc(1024, 1), maybe(getenv("LDFLAGS")));
|
char *LDFLAGS = strcpy(calloc(1024, 1), maybe(getenv("LDFLAGS")));
|
||||||
char *CC = strcpy(calloc(1024, 1), or_else(getenv("CC"), "cc"));
|
char *CC = strcpy(calloc(1024, 1), or_else(getenv("CC"), "cc"));
|
||||||
char *CXX = strcpy(calloc(1024, 1), or_else(getenv("CXX"), "g++"));
|
char *CXX = strcpy(calloc(1024, 1), or_else(getenv("CXX"), "g++"));
|
||||||
|
char *EXEC_SUFFIX = strcpy(calloc(1024, 1), maybe(getenv("EXEC_SUFFIX")));
|
||||||
|
|
||||||
char *EXAMPLE_FILES[] = {"Http3Server", "Broadcast", "HelloWorld", "Crc32", "ServerName",
|
char *EXAMPLE_FILES[] = {"Http3Server", "Broadcast", "HelloWorld", "Crc32", "ServerName",
|
||||||
"EchoServer", "BroadcastingEchoServer", "UpgradeSync", "UpgradeAsync"};
|
"EchoServer", "BroadcastingEchoServer", "UpgradeSync", "UpgradeAsync"};
|
||||||
@@ -73,7 +74,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
if (!strcmp(argv[1], "examples")) {
|
if (!strcmp(argv[1], "examples")) {
|
||||||
for (int i = 0; i < sizeof(EXAMPLE_FILES) / sizeof(char *); i++) {
|
for (int i = 0; i < sizeof(EXAMPLE_FILES) / sizeof(char *); i++) {
|
||||||
if (run("%s%s examples/%s.cpp %s -o %s", CXX, CXXFLAGS, EXAMPLE_FILES[i], LDFLAGS, EXAMPLE_FILES[i])) {
|
if (run("%s%s examples/%s.cpp %s -o %s%s", CXX, CXXFLAGS, EXAMPLE_FILES[i], LDFLAGS, EXAMPLE_FILES[i], EXEC_SUFFIX)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user