Compare commits
No commits in common. "e0d5d7e8099d37b3873967c9b98bf2d8ffc45b88" and "a47d3fe0cf6556f48a32744825c81a2f315d3ebb" have entirely different histories.
e0d5d7e809
...
a47d3fe0cf
2 changed files with 17 additions and 5 deletions
20
Makefile
20
Makefile
|
|
@ -1,5 +1,12 @@
|
|||
CC ?= gcc
|
||||
CFLAGS := -Wall -Wextra -ggdb
|
||||
.SILENT:
|
||||
|
||||
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)
|
||||
OBJ := $(SRC:.c=.o)
|
||||
|
|
@ -18,12 +25,17 @@ SUBDIRS += socket
|
|||
SUBDIRS += sqlite
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
@echo CC $@
|
||||
@$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
%.elf: %.o
|
||||
$(CC) $(LIBS) -o $@ $<
|
||||
@echo LD $@
|
||||
@$(CC) $(LIBS) -o $@ $<
|
||||
|
||||
all: $(ELF)
|
||||
# @for dir in $(SUBDIRS); do \
|
||||
# $(MAKE) -C $$dir; \
|
||||
# done
|
||||
|
||||
sub:
|
||||
@-find . -mindepth 1 -maxdepth 1 -type d -exec make --no-print-directory -C {} \;
|
||||
|
|
|
|||
2
prand.c
2
prand.c
|
|
@ -15,7 +15,7 @@ uint64_t prand() {
|
|||
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 x;
|
||||
uint64_t limit = UINT64_MAX - (UINT64_MAX % range);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue