diff options
author | jozan <jozan@noemail.net> | 2020-11-02 22:03:54 +0000 |
---|---|---|
committer | jozan <jozan@noemail.net> | 2020-11-02 22:03:54 +0000 |
commit | 3a14a1851c883806605efaea8268f33d5a239e48 (patch) | |
tree | dde698fb432997cf6c14cf0e5e6c0b499d5e4ef9 /Makefile | |
parent | In progress (diff) | |
download | unixize-3a14a1851c883806605efaea8268f33d5a239e48.tar.gz unixize-3a14a1851c883806605efaea8268f33d5a239e48.tar.bz2 unixize-3a14a1851c883806605efaea8268f33d5a239e48.tar.xz unixize-3a14a1851c883806605efaea8268f33d5a239e48.tar.zst unixize-3a14a1851c883806605efaea8268f33d5a239e48.zip |
Makefile now working
FossilOrigin-Name: 6ac056c0f516ca4e5dd543c370b317e3964c6be912376f446b58a88ebbbee6eb
Diffstat (limited to '')
-rw-r--r-- | Makefile | 61 |
1 files changed, 40 insertions, 21 deletions
@@ -1,36 +1,55 @@ -default: msan +# ======================== +# ===== =============== +# ====== ================ +# ====== ================ +# ====== ==== ==== == +# ====== === == = = +# ====== === = == = +# = === === = == ==== +# = === === = == = = +# == ===== ==== == +# ======================== +# +# unixize: Makefile +# 2020-11-02 21:43 +# Joe +# +# GNU Makefile -SHELL := /bin/sh +.DEFAULT_GOAL := msan +SHELL := /bin/sh -DESTDIR = /usr/local -SRCS_DIR = src/ -OBJS_DIR = obj/ +DESTDIR = /usr/local +SRCS_DIR = src/ +OBJS_DIR = obj/ -CC = cc -CFLAGS = -std=c89 -CFLAGS += -Wall -CFLAGS += -Wextra -CFLAGS += -Werror -CFLAGS += -pedantic +CC = cc +CFLAGS = -std=c89 +CFLAGS += -Wall +CFLAGS += -Wextra +CFLAGS += -Werror +CFLAGS += -pedantic -RM = rm -f -MKDIR = mkdir -p +RM = rm -rf +MKDIR = mkdir -p -SRCS_NAME = c_unixize +SRCS_NAME = c_unixize -SRCS = $(addprefix ${SRCS_DIR}, $(addsuffix .c, ${SRCS_NAME})) -INCS = $(addprefix ${SRCS_DIR}, $(addsuffix .h, ${SRCS_NAME})) -OBJS = $(patsubst ${SRCS_DIR}%.c, ${OBJS_DIR}%.c.o, ${SRCS}) +SRCS = $(addprefix ${SRCS_DIR}, $(addsuffix .c, ${SRCS_NAME})) +INCS = $(addprefix ${SRCS_DIR}, $(addsuffix .h, ${SRCS_NAME})) +OBJS = $(patsubst ${SRCS_DIR}%.c, ${OBJS_DIR}%.c.o, ${SRCS}) -TARGET = unixize +TARGET = unixize -${OBJS_DIR}%.o: ${SRCS_DIR}%.c ${INCS} Makefile +${OBJS_DIR}%.c.o: ${SRCS_DIR}%.c ${INCS} Makefile @${MKDIR} ${OBJS_DIR} - ${CC} -c ${CFLAGS} $@ $< + ${CC} -c ${CFLAGS} -o $@ $< -all: ${OBJS} +${TARGET}: ${OBJS} ${CC} ${CFLAGS} -o ${TARGET} ${OBJS} +all: ${TARGET} + debug: CFLAGS += -glldb debug: all |