aboutsummaryrefslogtreecommitdiffstats
path: root/test/Makefile
diff options
context:
space:
mode:
authorcc4b05f61e2d8f77114750386c9f9a60 <cc4b05f61e2d8f7@7114750386c9f9a60>2023-07-31 20:39:25 +0000
committercc4b05f61e2d8f77114750386c9f9a60 <cc4b05f61e2d8f7@7114750386c9f9a60>2023-07-31 20:39:25 +0000
commit2879103290bfed992b6be6c301bd2c19a60269ba (patch)
tree64bf89e31e449c08b7dbec98091fcc7f42bd75cd /test/Makefile
parentd200efe3756b8dcc71e079698213ad6504611f2d (diff)
downloaddmsdosnow-master.tar.gz
Update dir entry simple utHEADmaster
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile21
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)