diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2024-05-01 21:58:53 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2024-05-01 21:58:53 -0400 |
commit | 09637273dedf8fc266678a1841146a7046e21548 (patch) | |
tree | 6f51fd61bbb7669f851721d88fbb1862936f6da6 /Makefile | |
parent | 92b72179b0e81413a8a77106ff0fc28eed3aaade (diff) |
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..14ab9b5 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ + +SRC_DIR = src +BUILD_DIR = build +OBJ_DIR = $(BUILD_DIR)/artifacts +INCLUDE_DIR = ./include + +SRCS = $(notdir $(wildcard $(SRC_DIR)/*.c)) +OBJS = $(addsuffix .o, $(basename $(SRCS))) + +CFLAGS ?= -Werror -Wall + +build: build_dir $(OBJS) + $(CC) -lopensmarts -o $(BUILD_DIR)/osm-interplayd $(addprefix $(OBJ_DIR)/, $(OBJS)) + +%.o: $(SRC_DIR)/%.c + $(CC) $(CFLAGS) -c -I$(INCLUDE_DIR) -o $(BUILD_DIR)/artifacts/$@ $< + +build_dir: + mkdir -p $(BUILD_DIR) + mkdir -p $(OBJ_DIR) + |