diff options
author | cc4b05f61e2d8f77114750386c9f9a60 <cc4b05f61e2d8f7@7114750386c9f9a60> | 2023-05-12 08:39:37 +0000 |
---|---|---|
committer | cc4b05f61e2d8f77114750386c9f9a60 <cc4b05f61e2d8f7@7114750386c9f9a60> | 2023-07-19 21:05:39 +0000 |
commit | 177f9cba3e9813cf82ea764799a12128f65572cf (patch) | |
tree | 553e4086a588d18f0e27d5d607a34d5b9bcd0e04 /src/utils/Makefile | |
parent | 5ad2bb7a6ac7e97c031908d2439808a00fff6214 (diff) | |
download | dmsdosnow-177f9cba3e9813cf82ea764799a12128f65572cf.tar.gz |
Build mcdmsdos
Diffstat (limited to 'src/utils/Makefile')
-rw-r--r-- | src/utils/Makefile | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/utils/Makefile b/src/utils/Makefile new file mode 100644 index 0000000..89d3d1b --- /dev/null +++ b/src/utils/Makefile @@ -0,0 +1,22 @@ +CFLAGS := -c -Wall -D__DMSDOS_LIB__ +LDFLAGS := +SOURCES := mcdmsdos.c +BUILD_DIR := ./build +MAINSRC := mcdmsdos.c +LIBSRC := $(shell find ./lib/ -name '*.c') +SRC := $(MAINSRC) $(LIBSRC) +OBJS := $(SRC:%=$(BUILD_DIR)/%.o) + +EXECUTABLE := mcdmsdosnext + +all: $(SOURCES) $(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) |