summaryrefslogtreecommitdiffstats
path: root/fcp/Rules.mk
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@us.ibm.com>2014-06-30 22:10:16 -0500
committerPatrick Williams <iawillia@us.ibm.com>2014-07-02 22:49:29 -0500
commitbf4630076762d9c20c16c80c1c791f352b046dd1 (patch)
treeefc67bad010a28fd1abf5aeeefda2a969514fd97 /fcp/Rules.mk
downloadffs-bf4630076762d9c20c16c80c1c791f352b046dd1.tar.gz
ffs-bf4630076762d9c20c16c80c1c791f352b046dd1.zip
Port FFS tools over from Building Block repository.
Diffstat (limited to 'fcp/Rules.mk')
-rw-r--r--fcp/Rules.mk30
1 files changed, 30 insertions, 0 deletions
diff --git a/fcp/Rules.mk b/fcp/Rules.mk
new file mode 100644
index 0000000..490afd4
--- /dev/null
+++ b/fcp/Rules.mk
@@ -0,0 +1,30 @@
+CFLAGS += -m32 -D_GNU_SOURCE -std=gnu99 -D_FILE_OFFSET_BITS=64
+CFLAGS += -I$(DEPTH)/.. -iquote..
+
+LDFLAGS += -L. -m32
+
+NAME=fcp
+
+CLIB=$(DEPTH)/../clib/x86/libclib.a
+FFS=$(DEPTH)/../ffs/x86/libffs.a
+
+OBJS=cmd_list.o cmd_read.o cmd_write.o cmd_erase.o \
+ cmd_copy.o cmd_trunc.o cmd_user.o misc.o main.o
+
+TARGETS=$(NAME)
+
+vpath %.c ../src
+vpath %.h ..
+
+all: $(TARGETS)
+
+$(NAME): $(OBJS) $(FFS) $(CLIB)
+ $(CC) $(LDFLAGS) -Wl,-no-whole-archive \
+ -o $@ $^ -lpthread -ldl -lrt
+
+install: $(TARGETS)
+ $(INSTALL) fcp $(FCP_INSTALL)/bin
+ $(INSTALL) ../fcp.sh $(FCP_INSTALL_TEST)
+
+clean distclean:
+ $(RM) -f $(TARGETS) $(OBJS)
OpenPOWER on IntegriCloud