Compare commits

..

No commits in common. "e0d5d7e8099d37b3873967c9b98bf2d8ffc45b88" and "a47d3fe0cf6556f48a32744825c81a2f315d3ebb" have entirely different histories.

2 changed files with 17 additions and 5 deletions

View file

@ -1,5 +1,12 @@
CC ?= gcc .SILENT:
CFLAGS := -Wall -Wextra -ggdb
CC := gcc
CFLAGS := -Wall -Wextra -O2
# Silence some errors/warnings for now
CFLAGS += -Wno-implicit-fallthrough
CFLAGS += -Wno-strict-aliasing
CFLAGS += -Wno-uninitialized
SRC := $(wildcard *.c) SRC := $(wildcard *.c)
OBJ := $(SRC:.c=.o) OBJ := $(SRC:.c=.o)
@ -18,12 +25,17 @@ SUBDIRS += socket
SUBDIRS += sqlite SUBDIRS += sqlite
%.o: %.c %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $< @echo CC $@
@$(CC) $(CFLAGS) -c -o $@ $<
%.elf: %.o %.elf: %.o
$(CC) $(LIBS) -o $@ $< @echo LD $@
@$(CC) $(LIBS) -o $@ $<
all: $(ELF) all: $(ELF)
# @for dir in $(SUBDIRS); do \
# $(MAKE) -C $$dir; \
# done
sub: sub:
@-find . -mindepth 1 -maxdepth 1 -type d -exec make --no-print-directory -C {} \; @-find . -mindepth 1 -maxdepth 1 -type d -exec make --no-print-directory -C {} \;

View file

@ -15,7 +15,7 @@ uint64_t prand() {
return seed; return seed;
} }
uint64_t prand_range(uint64_t min, uint64_t max) { inline uint64_t prand_range(uint64_t min, uint64_t max) {
uint64_t range = max - min + 1; uint64_t range = max - min + 1;
uint64_t x; uint64_t x;
uint64_t limit = UINT64_MAX - (UINT64_MAX % range); uint64_t limit = UINT64_MAX - (UINT64_MAX % range);