summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2018-03-23 10:48:57 +0200
committerDan McDonald <danmcd@joyent.com>2018-05-14 08:38:36 -0400
commite86c665f2e10cf29ac3b5f93b53c60bef762a690 (patch)
tree202fcc37fc09c293089e2e62eb1a8f16086226e2 /usr/src
parent2c6e2b378f8445b330094f0316685e546585f44d (diff)
downloadillumos-joyent-e86c665f2e10cf29ac3b5f93b53c60bef762a690.tar.gz
9335 ficl: makesoftcore should be in tools
Reviewed by: Andrew Stormont <andyjstormont@gmail.com> Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/boot/sys/boot/ficl/softcore/Makefile28
-rw-r--r--usr/src/lib/libficl/softcore/Makefile24
-rw-r--r--usr/src/tools/Makefile1
-rw-r--r--usr/src/tools/makesoftcore/Makefile42
4 files changed, 57 insertions, 38 deletions
diff --git a/usr/src/boot/sys/boot/ficl/softcore/Makefile b/usr/src/boot/sys/boot/ficl/softcore/Makefile
index 92ec77324f..7b42031180 100644
--- a/usr/src/boot/sys/boot/ficl/softcore/Makefile
+++ b/usr/src/boot/sys/boot/ficl/softcore/Makefile
@@ -10,13 +10,15 @@
#
#
-# Copyright 2016 Toomas Soome <tsoome@me.com>
+# Copyright 2018 Toomas Soome <tsoome@me.com>
#
-include $(SRC)/tools/Makefile.tools
+include $(SRC)/Makefile.master
+
+install all: softcore.c
SOFTCORE= $(SRC)/common/ficl/softcore
-PROG = makesoftcore
+PROG= $(ONBLD_TOOLS)/bin/$(MACH)/makesoftcore
#
# not needed: file access
@@ -25,22 +27,8 @@ FR = softcore.fr ifbrack.fr prefix.fr ficl.fr jhlocal.fr marker.fr
FR += freebsd.fr ficllocal.fr oo.fr classes.fr string.fr wordsets.fr
SOURCES= $(FR:%=$(SOFTCORE)/%)
-OBJS= makesoftcore.o lz4.o
-SRCS= makesoftcore.c lz4.c
-LDLIBS= -lumem
-
-CPPFLAGS += -I.. -I$(SRC)/common/ficl
-
-all: softcore.c
-
-softcore.c: $(PROG) $(SOURCES)
- ./$(PROG) $(SOURCES)
-
-$(PROG): $(OBJS)
- $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
-
-%.o: $(SOFTCORE)/%.c
- $(COMPILE.c) $<
+softcore.c: $(SOURCES)
+ $(PROG) $(SOURCES)
clobber clean:
- $(RM) softcore.c $(OBJS) $(PROG)
+ $(RM) softcore.c
diff --git a/usr/src/lib/libficl/softcore/Makefile b/usr/src/lib/libficl/softcore/Makefile
index 7d62e1ba32..7b42031180 100644
--- a/usr/src/lib/libficl/softcore/Makefile
+++ b/usr/src/lib/libficl/softcore/Makefile
@@ -10,15 +10,15 @@
#
#
-# Copyright 2016 Toomas Soome <tsoome@me.com>
+# Copyright 2018 Toomas Soome <tsoome@me.com>
#
-include $(SRC)/tools/Makefile.tools
+include $(SRC)/Makefile.master
install all: softcore.c
SOFTCORE= $(SRC)/common/ficl/softcore
-PROG = makesoftcore
+PROG= $(ONBLD_TOOLS)/bin/$(MACH)/makesoftcore
#
# not needed: file access
@@ -27,20 +27,8 @@ FR = softcore.fr ifbrack.fr prefix.fr ficl.fr jhlocal.fr marker.fr
FR += freebsd.fr ficllocal.fr oo.fr classes.fr string.fr wordsets.fr
SOURCES= $(FR:%=$(SOFTCORE)/%)
-OBJS= makesoftcore.o lz4.o
-SRCS= makesoftcore.c lz4.c
-LDLIBS= -lumem
-
-CPPFLAGS += -I.. -I$(SRC)/common/ficl
-
-softcore.c: $(PROG) $(SOURCES)
- ./$(PROG) $(SOURCES)
-
-$(PROG): $(OBJS)
- $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
-
-%.o: $(SOFTCORE)/%.c
- $(COMPILE.c) $<
+softcore.c: $(SOURCES)
+ $(PROG) $(SOURCES)
clobber clean:
- $(RM) softcore.c $(OBJS) $(PROG)
+ $(RM) softcore.c
diff --git a/usr/src/tools/Makefile b/usr/src/tools/Makefile
index 096b570b2c..ef9cf113bf 100644
--- a/usr/src/tools/Makefile
+++ b/usr/src/tools/Makefile
@@ -48,6 +48,7 @@ COMMON_SUBDIRS= \
findunref \
lintdump \
make \
+ makesoftcore \
ndrgen \
onbld \
protocmp \
diff --git a/usr/src/tools/makesoftcore/Makefile b/usr/src/tools/makesoftcore/Makefile
new file mode 100644
index 0000000000..c30ddacd14
--- /dev/null
+++ b/usr/src/tools/makesoftcore/Makefile
@@ -0,0 +1,42 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2018 Toomas Soome <tsoome@me.com>
+#
+
+include ../Makefile.tools
+
+SOFTCORE= $(SRC)/common/ficl/softcore
+PROG= makesoftcore
+
+CPPFLAGS += -I$(SRC)/lib/libficl -I$(SRC)/common/ficl
+OBJS= makesoftcore.o lz4.o
+SRCS= makesoftcore.c lz4.c
+LDLIBS= -lumem
+
+.KEEP_STATE:
+
+all: $(PROG)
+
+install: all .WAIT $(ROOTONBLDMACHPROG)
+
+clean:
+ $(RM) $(PROG) $(OBJS)
+
+$(PROG): $(OBJS)
+ $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
+ $(POST_PROCESS)
+
+%.o: $(SOFTCORE)/%.c
+ $(COMPILE.c) -o $@ $<
+
+include ../Makefile.targ