aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild/handmade.sobin264736 -> 0 bytes
-rwxr-xr-xbuild/linux_handmadebin88880 -> 0 bytes
-rwxr-xr-xbuild/win32_handmade.exebin367616 -> 0 bytes
-rw-r--r--code/build.cpp32
-rw-r--r--code/handmade.h5
5 files changed, 27 insertions, 10 deletions
diff --git a/build/handmade.so b/build/handmade.so
deleted file mode 100755
index daf4888..0000000
--- a/build/handmade.so
+++ /dev/null
Binary files differ
diff --git a/build/linux_handmade b/build/linux_handmade
deleted file mode 100755
index 16020f0..0000000
--- a/build/linux_handmade
+++ /dev/null
Binary files differ
diff --git a/build/win32_handmade.exe b/build/win32_handmade.exe
deleted file mode 100755
index 5ef66f7..0000000
--- a/build/win32_handmade.exe
+++ /dev/null
Binary files differ
diff --git a/code/build.cpp b/code/build.cpp
index 9583de3..ffd0668 100644
--- a/code/build.cpp
+++ b/code/build.cpp
@@ -1,17 +1,11 @@
#include "libs/build.h"
-int main(int ArgsCount, char *Args[], char *Env[])
+void Build(char *Name, str8 Flags)
{
- LinuxChangeToExecutableDirectory(Args);
- LinuxRebuildSelf(ArgsCount, Args, Env);
- printf("[linux handmade compile]\n");
+ printf("%s\n", Name);
str8_list BuildCommandList = CommonBuildCommand(false, true ,true);
- Str8ListAppend(&BuildCommandList,
- S8Lit("-DHANDMADE_INTERNAL=1 -DHANDMADE_SLOW=1 -DHANDMADE_SMALL_RESOLUTION=1 "
- "-lX11 -lXfixes -lasound -lcurl "
- "-o linux_handmade "
- "../code/libs/hm_linux/linux_handmade.cpp"));
+ Str8ListAppend(&BuildCommandList, Flags);
str8 BuildCommand = Str8ListJoin(BuildCommandList, sizeof(OutputBuffer), OutputBuffer, ' ');
linux_command_result CommandResult = LinuxRunCommandString(BuildCommand, Env, true);
@@ -21,5 +15,25 @@ int main(int ArgsCount, char *Args[], char *Env[])
printf("%*s", (int)BytesToRead, OutputBuffer);
}
+}
+
+
+int main(int ArgsCount, char *Args[], char *Env[])
+{
+ LinuxChangeToExecutableDirectory(Args);
+ LinuxRebuildSelf(ArgsCount, Args, Env);
+
+ Build("[linux handmade compile]", S8Lit("-DHANDMADE_INTERNAL=1 -DHANDMADE_SLOW=1 -DHANDMADE_SMALL_RESOLUTION=1 "
+ "-lX11 -lXfixes -lasound "
+ "-o linux_handmade "
+ "../code/libs/hm_linux/linux_handmade.cpp"));
+
+ Build("[handmade compile]",
+ S8Lit("-shared -fPIC "
+ "-DHANDMADE_INTERNAL=1 -DHANDMADE_SLOW=1"
+ "-Wno-conversion "
+ "-o handmade.so "
+ "../code/handmade.cpp"));
+
return 0;
}
diff --git a/code/handmade.h b/code/handmade.h
index b59ae8c..b8e4616 100644
--- a/code/handmade.h
+++ b/code/handmade.h
@@ -1,9 +1,12 @@
#if !defined(HANDMADE_H)
+#include "handmade_platform.h"
+
//~ Libraries
+PUSH_WARNINGS
#define STB_TRUETYPE_IMPLEMENTATION
#include "libs/stb_truetype.h"
-#include "handmade_platform.h"
+POP_WARNINGS
#include "handmade_intrinsics.h"
#include "handmade_math.h"