diff options
| author | Carson Fleming <cflems@cflems.net> | 2025-07-10 21:24:03 -0400 |
|---|---|---|
| committer | Carson Fleming <cflems@cflems.net> | 2025-07-10 21:24:34 -0400 |
| commit | a430aa79070b25e0863dfe8d729b27b5346199c6 (patch) | |
| tree | 4887652a2ffb7c0eb8dd54e10ac45ce14568b4fb /makefile | |
| parent | 52deba5ff9747af1b456edd4559dd63e27e1ae19 (diff) | |
| download | asyncc-a430aa79070b25e0863dfe8d729b27b5346199c6.tar.gz | |
Initial version
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/makefile b/makefile new file mode 100644 index 0000000..5f0c282 --- /dev/null +++ b/makefile @@ -0,0 +1,22 @@ +PROD_DIR = src/main +TEST_DIR = src/test + +HEADERS := $(wildcard $(PROD_DIR)/*.h) +PROD_TARGET := build/asyncc.so +PROD_SRC := $(wildcard $(PROD_DIR)/*.c) +TEST_TARGET := build/test.out +TEST_SRC := $(wildcard $(TEST_DIR)/*.c) + +CC = gcc +CFLAGS = -I $(PROD_DIR) -Wall -Werror -Wextra -std=c99 -g +PROD_CFLAGS = -shared +TEST_CFLAGS = -Wno-incompatible-pointer-types -Wno-int-conversion -Wno-pointer-to-int-cast +all: main test +main: $(PROD_TARGET) +test: $(TEST_TARGET) + +$(PROD_TARGET): $(HEADERS) $(PROD_SRC) + $(CC) $(CFLAGS) $(PROD_CFLAGS) $(PROD_SRC) -o $(PROD_TARGET) + +$(TEST_TARGET): $(HEADERS) $(PROD_SRC) $(TEST_SRC) + $(CC) $(CFLAGS) $(TEST_CFLAGS) $(PROD_SRC) $(TEST_SRC) -o $(TEST_TARGET) |
