aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJozanLeClerc <JozanLeClerc@noemail.net>2020-11-26 20:59:35 +0000
committerJozanLeClerc <JozanLeClerc@noemail.net>2020-11-26 20:59:35 +0000
commit5ca2ba01dc0e34d6811e32f5c4dcf9d5e6b003c2 (patch)
tree87c7f250cf7fdb8bf3c42902614693f267c75cbd /Makefile
parentTrying to Makefile (diff)
downloadbsdsetsid-5ca2ba01dc0e34d6811e32f5c4dcf9d5e6b003c2.tar.gz
bsdsetsid-5ca2ba01dc0e34d6811e32f5c4dcf9d5e6b003c2.tar.bz2
bsdsetsid-5ca2ba01dc0e34d6811e32f5c4dcf9d5e6b003c2.tar.xz
bsdsetsid-5ca2ba01dc0e34d6811e32f5c4dcf9d5e6b003c2.tar.zst
bsdsetsid-5ca2ba01dc0e34d6811e32f5c4dcf9d5e6b003c2.zip
I give up on this makeobjdir shit
FossilOrigin-Name: a4027a7c56dab82070a7abcc94e92063a9307594
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 13 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 1ab361a..37ebdbd 100644
--- a/Makefile
+++ b/Makefile
@@ -19,17 +19,18 @@
default: all
SRCS_DIR := src
-OBJS_DIR := obj
+# OBJS_DIR := obj
PREFIX ?= /usr/local/
DESTDIR :=
MAKEOBJDIR := ./
-SRCS = c_bsdsetsid
+SRCS := c_bsdsetsid
+SRCS += c_fork
SRCS := ${SRCS:S/$/.c/g}
SRCS := ${SRCS:S/^/${SRCS_DIR}\//g}
OBJS := ${SRCS:=.o}
-OBJS := ${SRCS:S/${SRCS_DIR}/${OBJS_DIR}/g}
+# OBJS := ${OBJS:S/${SRCS_DIR}/${OBJS_DIR}/g}
INCS := ${SRCS:.c=.h}
@@ -47,28 +48,24 @@ MKDIR := mkdir -p
SED := sed -i ''
.OBJDIR: ./
-.SUFFIXES: .c.o .c
-.c.c.o:
+.SUFFIXES: .c.o .o
+
+.c.c.o: ${INCS}
${CC} -c ${CFLAGS} -o ${.TARGET} ${.IMPSRC}
${NAME}: ${OBJS}
${CC} ${CFLAGS} -o ${.TARGET} ${.ALLSRC}
-${OBJS_DIR}:
- ${MKDIR} ${OBJS_DIR}
-
-.depend:
- ${CC} -I${SRCS_DIR} -E -MM ${SRCS} > .depend
- ${SED} 's/^/${OBJS_DIR}\//g' .depend
- ${SED} 's/\.o/\.c.o/g' .depend
+# ${OBJS_DIR}:
+ # ${MKDIR} ${OBJS_DIR}
-all: .depend ${OBJS_DIR} ${NAME}
+all: ${OBJS_DIR} ${NAME}
clean:
- ${RM} ${OBJS} ${NAME} .depend vgcore*
- ${RM} -R obj
+ ${RM} ${OBJS} ${NAME} vgcore*
+ # ${RM} -R ${OBJS_DIR}
-.PHONY: all clean .depend
+.PHONY: all clean depend
# Files prefixes index
# --------------------