aboutsummaryrefslogtreecommitdiff
path: root/DOSmakefile
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2022-11-30 21:03:28 +0100
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2022-11-30 21:03:28 +0100
commitfdd88f97b9f684468225ecb5432917251f2e91c6 (patch)
tree9ccce6aa3d77860f3f0e15a47b42cefa46fea656 /DOSmakefile
parent6ab7111b84ca1ea8a8a8229c0d89387ccd85c111 (diff)
downloadutils-fdd88f97b9f684468225ecb5432917251f2e91c6.tar.gz
utils-fdd88f97b9f684468225ecb5432917251f2e91c6.zip
Rename `makefile` in `DOSmakefile`
Diffstat (limited to 'DOSmakefile')
-rw-r--r--DOSmakefile55
1 files changed, 55 insertions, 0 deletions
diff --git a/DOSmakefile b/DOSmakefile
new file mode 100644
index 0000000..6f2d88b
--- /dev/null
+++ b/DOSmakefile
@@ -0,0 +1,55 @@
+#
+# Copyright (C) 2022 Alessandro Iezzi <aiezzi AT alessandroiezzi PERIOD it>
+#
+# This file is part of clist.
+#
+# clist is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# clist is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with clist. If not, see <https://www.gnu.org/licenses/>.
+#
+
+OUT1 = .
+include <win-sdk.mk>
+
+NAME=clist
+
+SRC=src
+BIN=bin
+OBJ=obj
+
+CC=cl
+LB=lib
+
+cdebug=
+cflags=
+cvars=
+
+LIBS=$(WIN_SDK_LIBS)
+
+all: init dist dll lib
+
+init:
+ if not exist $(BIN) mkdir $(BIN)
+ if not exist $(OBJ) mkdir $(OBJ)
+
+dist: init
+ $(CC) /Fo$(OBJ)\ $(cdebug) $(cflags) $(cvars) $(SRC)\*.c /link $(LIBS) /OUT:$(BIN)\$(NAME).exe
+
+dll: init
+ $(CC) /Fo$(OBJ)\ /LD $(SRC)\*.c /link /OUT:$(BIN)\$(NAME).dll
+
+lib: init dll
+ $(LB) /OUT:$(BIN)\$(NAME).lib $(OBJ)\*.obj
+
+clean:
+ if exist $(BIN) rmdir /s /q $(BIN)
+ if exist $(OBJ) rmdir /s /q $(OBJ)