diff options
author | cc4b05f61e2d8f77114750386c9f9a60 <cc4b05f61e2d8f7@7114750386c9f9a60> | 2023-07-31 20:39:25 +0000 |
---|---|---|
committer | cc4b05f61e2d8f77114750386c9f9a60 <cc4b05f61e2d8f7@7114750386c9f9a60> | 2023-07-31 20:39:25 +0000 |
commit | 2879103290bfed992b6be6c301bd2c19a60269ba (patch) | |
tree | 64bf89e31e449c08b7dbec98091fcc7f42bd75cd /test/Makefile | |
parent | d200efe3756b8dcc71e079698213ad6504611f2d (diff) | |
download | dmsdosnow-2879103290bfed992b6be6c301bd2c19a60269ba.tar.gz |
Diffstat (limited to 'test/Makefile')
-rw-r--r-- | test/Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 0000000..eafe3ba --- /dev/null +++ b/test/Makefile @@ -0,0 +1,21 @@ +CFLAGS := -c -g -Wall -D__DMSDOS_LIB__ +LDFLAGS := +BUILD_DIR := ./build +MAINSRC := ut.c +LIBSRC := $(shell find ./lib/ -name '*.c') +SRC := $(MAINSRC) $(LIBSRC) +OBJS := $(SRC:%=$(BUILD_DIR)/%.o) + +EXECUTABLE := ut + +all: $(MAINSRC) $(EXECUTABLE) + +$(EXECUTABLE): $(OBJS) + $(CC) $(LDFLAGS) $(OBJS) -o $(BUILD_DIR)/$@ + +$(BUILD_DIR)/%.c.o: %.c + mkdir -p $(dir $@) + $(CC) $(CFLAGS) -c $< -o $@ + +clean: + rm -r $(BUILD_DIR) |