Debian Codegraph @

rumpdisk/Makefile

raw symbols SCIP
1 #
2 # Copyright (C) 2019, 2023 Free Software Foundation, Inc.
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 2, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 RUMPLIBS=rump rumpuser rumpdev rumpdev_disk rumpdev_pci rumpvfs
19 RUMPSATA=rumpdev_ahcisata rumpdev_piixide rumpdev_ata
20 RUMPUSB=rumpdev_usb rumpdev_pci_usbhc rumpdev_umass rumpdev_scsipi
21 RUMPEXTRA=rumpdev_scsipi
22
23 # If we have a configured tree, include the configuration so that we
24 # can conditionally build translators.
25 ifneq (,$(wildcard ../config.make))
26 include ../config.make
27 endif
28
29 # TODO: install .so version of rumpvfs_nofifofs so we don't have to do this!
30 ifeq ($(HAVE_LIBRUMP_VFSNOFIFO),yes)
31 RUMPSTATIC=-Wl,--whole-archive -lrumpvfs_nofifofs_pic -Wl,--no-whole-archive
32 else
33 RUMPSTATIC=
34 endif
35
36 dir := rumpdisk
37 makemode := servers
38
39 SRCS = main.c block-rump.c
40 LCLHDRS = block-rump.h ioccom-rump.h
41 targets = rumpdisk rumpusbdisk
42 HURDLIBS = machdev ports trivfs shouldbeinlibc iohelp ihash fshelp irqhelp
43 LDLIBS += -lpthread -lpciaccess -ldl -lz
44
45 %.disk.o: %.c
46 $(CC) $(CFLAGS) $(CPPFLAGS) -D_RUMP_SATA -c $< -o $@
47 rumpdisk-OBJS = $(SRCS:.c=.disk.o)
48 rumpdisk-LDLIBS += $(HURDLIBS:%=-l%) $(RUMPSTATIC) $(RUMPEXTRA:%=-l%) \
49 -Wl,--no-as-needed $(RUMPSATA:%=-l%) $(RUMPLIBS:%=-l%) -Wl,--as-needed
50 rumpdisk.static-LDLIBS += $(HURDLIBS:%=-l%) $(RUMPSTATIC) $(RUMPEXTRA:%=-l%_pic) \
51 -Wl,--whole-archive $(RUMPSATA:%=-l%_pic) $(RUMPLIBS:%=-l%_pic) -Wl,--no-whole-archive
52 rumpdisk rumpdisk.static: $(rumpdisk-OBJS)
53
54 %.usb.o: %.c
55 $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
56 rumpusbdisk-OBJS = $(SRCS:.c=.usb.o)
57 rumpusbdisk-LDLIBS += $(HURDLIBS:%=-l%) $(RUMPSTATIC) \
58 -Wl,--no-as-needed $(RUMPUSB:%=-l%) $(RUMPLIBS:%=-l%) -Wl,--as-needed
59 rumpusbdisk.static-LDLIBS += $(HURDLIBS:%=-l%) $(RUMPSTATIC) \
60 -Wl,--whole-archive $(RUMPUSB:%=-l%_pic) $(RUMPLIBS:%=-l%_pic) -Wl,--no-whole-archive
61 rumpusbdisk rumpusbdisk.static: $(rumpusbdisk-OBJS)
62
63 include ../Makeconf