diff --git a/Makefile b/Makefile index d0d2ab986..d79899489 100644 --- a/Makefile +++ b/Makefile @@ -276,14 +276,14 @@ tags: TAGS HTAGS o/$(MODE)/.x: @$(COMPILE) -AMKDIR -tT$@ $(MKDIR) $(@D) -o/$(MODE)/srcs.txt: o/$(MODE)/.x $(MAKEFILES) $(call uniq,$(foreach x,$(SRCS),$(dir $(x)))) +o/$(MODE)/srcs.txt: o/$(MODE)/.x $(MAKEFILES) $(call uniq,$(foreach x,$(SRCS),$(dir $(x)))) $(SRCS) $(file >$@,$(SRCS)) -o/$(MODE)/hdrs.txt: o/$(MODE)/.x $(MAKEFILES) $(call uniq,$(foreach x,$(HDRS) $(INCS),$(dir $(x)))) +o/$(MODE)/hdrs.txt: o/$(MODE)/.x $(MAKEFILES) $(call uniq,$(foreach x,$(HDRS) $(INCS),$(dir $(x)))) $(HDRS) $(INCS) $(file >$@,$(HDRS) $(INCS)) -o/$(MODE)/incs.txt: o/$(MODE)/.x $(MAKEFILES) $(call uniq,$(foreach x,$(INCS) $(INCS),$(dir $(x)))) +o/$(MODE)/incs.txt: o/$(MODE)/.x $(MAKEFILES) $(call uniq,$(foreach x,$(INCS) $(INCS),$(dir $(x)))) $(INCS) $(INCS) $(file >$@,$(INCS)) o/$(MODE)/depend: o/$(MODE)/.x o/$(MODE)/srcs.txt o/$(MODE)/hdrs.txt o/$(MODE)/incs.txt $(SRCS) $(HDRS) $(INCS) - @$(COMPILE) -AMKDEPS -L320 $(MKDEPS) -o $@ -r o/$(MODE)/ @o/$(MODE)/srcs.txt @o/$(MODE)/hdrs.txt @o/$(MODE)/incs.txt + $(COMPILE) -AMKDEPS -L320 $(MKDEPS) -o $@ -r o/$(MODE)/ @o/$(MODE)/srcs.txt @o/$(MODE)/hdrs.txt @o/$(MODE)/incs.txt o/$(MODE)/srcs-old.txt: o/$(MODE)/.x $(MAKEFILES) $(call uniq,$(foreach x,$(SRCS),$(dir $(x)))) $(file >$@) $(foreach x,$(SRCS),$(file >>$@,$(x))) @@ -296,7 +296,7 @@ TAGS: o/$(MODE)/srcs-old.txt $(SRCS) #o/$(MODE)/third_party/ctags/ctags.com @o/$(MODE)/third_party/ctags/ctags.com $(TAGSFLAGS) -L $< -o $@ HTAGS: private .UNSANDBOXED = 1 -HTAGS: o/$(MODE)/hdrs-old.txt $(HDRS) #o/$(MODE)/third_party/ctags/ctags.com +HTAGS: o/$(MODE)/hdrs-old.txt $(filter-out third_party/libcxx/%,$(HDRS)) #o/$(MODE)/third_party/ctags/ctags.com @$(RM) $@ @build/htags o/$(MODE)/third_party/ctags/ctags.com -L $< -o $@ diff --git a/libc/log/oncrash_amd64.c b/libc/log/oncrash_amd64.c index 35f52bde0..bbea0034b 100644 --- a/libc/log/oncrash_amd64.c +++ b/libc/log/oncrash_amd64.c @@ -37,6 +37,7 @@ #include "libc/log/internal.h" #include "libc/log/log.h" #include "libc/macros.internal.h" +#include "libc/math.h" #include "libc/nexgen32e/stackframe.h" #include "libc/runtime/internal.h" #include "libc/runtime/pc.internal.h" @@ -45,7 +46,6 @@ #include "libc/str/str.h" #include "libc/thread/thread.h" #include "libc/thread/tls.h" -#include "third_party/libcxx/math.h" #ifdef __x86_64__ STATIC_YOINK("strerror_wr"); // for kprintf %m diff --git a/libc/tinymath/fabsf.c b/libc/tinymath/fabsf.c index cb5ccfdd7..412720f0a 100644 --- a/libc/tinymath/fabsf.c +++ b/libc/tinymath/fabsf.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "third_party/libcxx/math.h" +#include "libc/math.h" /** * Returns absolute value of floating point number. diff --git a/libc/tinymath/floorf.c b/libc/tinymath/floorf.c index 2e7aa1154..0d470bed9 100644 --- a/libc/tinymath/floorf.c +++ b/libc/tinymath/floorf.c @@ -25,9 +25,9 @@ │ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │ │ │ ╚─────────────────────────────────────────────────────────────────────────────*/ +#include "libc/math.h" #include "libc/tinymath/internal.h" #include "third_party/intel/smmintrin.internal.h" -#include "third_party/libcxx/math.h" asm(".ident\t\"\\n\\n\ Musl libc (MIT License)\\n\ diff --git a/libc/tinymath/hornerf.internal.h b/libc/tinymath/hornerf.internal.h index 09ee6b933..33a5f383d 100644 --- a/libc/tinymath/hornerf.internal.h +++ b/libc/tinymath/hornerf.internal.h @@ -11,7 +11,6 @@ COSMOPOLITAN_C_START_ #endif #include "libc/tinymath/horner_wrap.internal.h" -#include "third_party/libcxx/math.h" COSMOPOLITAN_C_END_ #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ diff --git a/libc/vga/vga.mk b/libc/vga/vga.mk index 1030e08b8..b0b2cc0b9 100644 --- a/libc/vga/vga.mk +++ b/libc/vga/vga.mk @@ -7,6 +7,7 @@ LIBC_VGA_ARTIFACTS += LIBC_VGA_A LIBC_VGA_A = o/$(MODE)/libc/vga/vga.a LIBC_VGA_A_FILES := $(wildcard libc/vga/*) LIBC_VGA_A_HDRS = $(filter %.h,$(LIBC_VGA_A_FILES)) +LIBC_VGA_A_INCS = $(filter %.inc,$(LIBC_VGA_A_FILES)) LIBC_VGA_A_SRCS_S = $(filter %.S,$(LIBC_VGA_A_FILES)) LIBC_VGA_A_SRCS_C = $(filter %.c,$(LIBC_VGA_A_FILES)) @@ -47,6 +48,7 @@ $(LIBC_VGA_A).pkg: \ LIBC_VGA_LIBS = $(foreach x,$(LIBC_VGA_ARTIFACTS),$($(x))) LIBC_VGA_SRCS = $(foreach x,$(LIBC_VGA_ARTIFACTS),$($(x)_SRCS)) LIBC_VGA_HDRS = $(foreach x,$(LIBC_VGA_ARTIFACTS),$($(x)_HDRS)) +LIBC_VGA_INCS = $(foreach x,$(LIBC_VGA_ARTIFACTS),$($(x)_INCS)) LIBC_VGA_BINS = $(foreach x,$(LIBC_VGA_ARTIFACTS),$($(x)_BINS)) LIBC_VGA_CHECKS = $(foreach x,$(LIBC_VGA_ARTIFACTS),$($(x)_CHECKS)) LIBC_VGA_OBJS = $(foreach x,$(LIBC_VGA_ARTIFACTS),$($(x)_OBJS)) diff --git a/third_party/make/job.c b/third_party/make/job.c index 9c8042057..b782890e1 100644 --- a/third_party/make/job.c +++ b/third_party/make/job.c @@ -45,6 +45,7 @@ this program. If not, see . */ #include "libc/log/log.h" #include "libc/log/rop.internal.h" #include "libc/macros.internal.h" +#include "libc/math.h" #include "libc/nexgen32e/kcpuids.h" #include "libc/runtime/runtime.h" #include "libc/sock/sock.h" @@ -59,7 +60,6 @@ this program. If not, see . */ #include "libc/sysv/errfuns.h" #include "libc/time/time.h" #include "libc/x/x.h" -#include "third_party/libcxx/math.h" #include "third_party/make/commands.h" #include "third_party/make/dep.h" #include "third_party/make/os.h" diff --git a/third_party/python/Modules/tokenbucket.c b/third_party/python/Modules/tokenbucket.c index 39c044542..c56705574 100644 --- a/third_party/python/Modules/tokenbucket.c +++ b/third_party/python/Modules/tokenbucket.c @@ -37,7 +37,6 @@ #include "libc/sysv/consts/sock.h" #include "libc/sysv/consts/timer.h" #include "net/http/tokenbucket.h" -#include "third_party/libcxx/math.h" #include "third_party/python/Include/bytesobject.h" #include "third_party/python/Include/import.h" #include "third_party/python/Include/intrcheck.h" diff --git a/third_party/sqlite3/rtree.c b/third_party/sqlite3/rtree.c index 4ec4a8e34..8490d7292 100644 --- a/third_party/sqlite3/rtree.c +++ b/third_party/sqlite3/rtree.c @@ -1,3 +1,4 @@ +// clang-format off /* ** 2001 September 15 ** @@ -4399,7 +4400,7 @@ static void rtreecheck( /* Conditionally include the geopoly code */ #ifdef SQLITE_ENABLE_GEOPOLY -# include "geopoly.inc" +#include "third_party/sqlite3/geopoly.inc" #endif /* diff --git a/third_party/zstd/lib/decompress/zstd_ddict.c b/third_party/zstd/lib/decompress/zstd_ddict.c index a288291d0..68c05aea2 100644 --- a/third_party/zstd/lib/decompress/zstd_ddict.c +++ b/third_party/zstd/lib/decompress/zstd_ddict.c @@ -26,7 +26,7 @@ #include "third_party/zstd/lib/decompress/zstd_ddict.h" #if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) -#include "third_party/zstd/lib/legacy/zstd_legacy.h" +//#include "third_party/zstd/lib/legacy/zstd_legacy.h" #endif diff --git a/third_party/zstd/lib/decompress/zstd_decompress.c b/third_party/zstd/lib/decompress/zstd_decompress.c index 0c84e33df..61e6f0acf 100644 --- a/third_party/zstd/lib/decompress/zstd_decompress.c +++ b/third_party/zstd/lib/decompress/zstd_decompress.c @@ -70,7 +70,7 @@ #include "third_party/zstd/lib/common/bits.h" /* ZSTD_highbit32 */ #if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1) -#include "third_party/zstd/lib/legacy/zstd_legacy.h" +//#include "third_party/zstd/lib/legacy/zstd_legacy.h" #endif diff --git a/third_party/zstd/zstd.mk b/third_party/zstd/zstd.mk index e7c508cc0..8aafd1a0d 100644 --- a/third_party/zstd/zstd.mk +++ b/third_party/zstd/zstd.mk @@ -12,6 +12,9 @@ THIRD_PARTY_ZSTD_A_INCS = $(filter %.inc,$(THIRD_PARTY_ZSTD_A_FILES)) THIRD_PARTY_ZSTD_A_OBJS = $(THIRD_PARTY_ZSTD_A_SRCS:%.c=o/$(MODE)/%.o) THIRD_PARTY_ZSTD_A_FILES := \ +third_party/zstd/zstd.h \ +third_party/zstd/zdict.h \ +third_party/zstd/zstd_errors.h \ third_party/zstd/lib/common/allocations.h \ third_party/zstd/lib/common/bits.h \ third_party/zstd/lib/common/bitstream.h \ @@ -166,9 +169,11 @@ o/$(MODE)/third_party/zstd/lib/compress/zstd_lazy.o: \ THIRD_PARTY_ZSTD_BINS = $(THIRD_PARTY_ZSTD_COMS) $(THIRD_PARTY_ZSTD_COMS:%=%.dbg) THIRD_PARTY_ZSTD_COMS = o/$(MODE)/third_party/zstd/zstd.com THIRD_PARTY_ZSTD_LIBS = $(THIRD_PARTY_ZSTD_A) - -THIRD_PARTY_ZSTD_CHECKS = $(foreach x,$(THIRD_PARTY_ZSTD_ARTIFACTS),$($(x)_CHECKS)) +THIRD_PARTY_ZSTD_SRCS = $(foreach x,$(THIRD_PARTY_ZSTD_ARTIFACTS),$($(x)_SRCS)) +THIRD_PARTY_ZSTD_INCS = $(foreach x,$(THIRD_PARTY_ZSTD_ARTIFACTS),$($(x)_INCS)) +THIRD_PARTY_ZSTD_HDRS = $(foreach x,$(THIRD_PARTY_ZSTD_ARTIFACTS),$($(x)_HDRS)) THIRD_PARTY_ZSTD_OBJS = $(foreach x,$(THIRD_PARTY_ZSTD_ARTIFACTS),$($(x)_OBJS)) +THIRD_PARTY_ZSTD_CHECKS = $(foreach x,$(THIRD_PARTY_ZSTD_ARTIFACTS),$($(x)_CHECKS)) $(THIRD_PARTY_ZSTD_OBJS): $(BUILD_FILES) third_party/zstd/zstd.mk .PHONY: o/$(MODE)/third_party/zstd diff --git a/tool/viz/deathstar.c b/tool/viz/deathstar.c index 877b0657a..ac496ec85 100644 --- a/tool/viz/deathstar.c +++ b/tool/viz/deathstar.c @@ -2,10 +2,11 @@ #include "libc/calls/struct/sigaction.h" #include "libc/calls/struct/termios.h" #include "libc/intrin/safemacros.internal.h" +#include "libc/math.h" #include "libc/runtime/runtime.h" +#include "libc/stdio/stdio.h" #include "libc/str/str.h" #include "libc/sysv/consts/sig.h" -#include "third_party/libcxx/math.h" /** * @fileoverview demo code borrowed from Rosetta Code.