summaryrefslogtreecommitdiffstats
path: root/test/Makefile
diff options
context:
space:
mode:
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)