2005-11-21 23:55:56 +00:00
|
|
|
#
|
2007-09-06 22:09:11 +00:00
|
|
|
# (c) 2005-2007 Laurent Vivier <Laurent@lvivier.info>
|
2005-11-21 23:55:56 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
TOP = $(shell pwd)
|
|
|
|
VPATH=$(TOP)
|
|
|
|
|
2006-11-01 19:48:51 +00:00
|
|
|
CFLAGS += -nostdlib -nodefaultlibs -Wall -Werror -Wno-multichar -fpic -g -O2 -Os
|
2005-11-27 22:37:01 +00:00
|
|
|
#-m68000 -Wa,-m68000
|
2005-11-26 08:53:39 +00:00
|
|
|
CPPFLAGS = -I$(TOP)/../libmacos -I$(TOP) -I$(TOP)/../libgzip
|
2005-11-21 23:55:56 +00:00
|
|
|
|
2007-09-01 21:49:54 +00:00
|
|
|
LIBRARIES = scsi/libstream.a floppy/libstream.a full/libstream.a
|
2005-11-21 23:55:56 +00:00
|
|
|
|
2005-11-22 23:14:55 +00:00
|
|
|
SOURCES = stream_close.c stream_open.c stream_read.c stream_lseek.c \
|
2005-11-23 00:09:00 +00:00
|
|
|
stream_uncompress.c gzio.c stream_fstat.c
|
2005-11-21 23:55:56 +00:00
|
|
|
|
|
|
|
HEADERS = libstream.h
|
|
|
|
|
2007-09-01 21:49:54 +00:00
|
|
|
SCSI_FLAGS = -DSCSI_SUPPORT -I$(TOP)/../libscsi
|
|
|
|
ISO9660_FLAGS = -DISO9660_SUPPORT -I$(TOP)/../libiso9660
|
2008-04-12 22:27:13 +00:00
|
|
|
EXT2_FLAGS = -DEXT2_SUPPORT -I$(TOP)/../libext2
|
2007-09-01 21:49:54 +00:00
|
|
|
CONTAINER_FLAGS = -DCONTAINER_SUPPORT -I$(TOP)/../libcontainer
|
|
|
|
FLOPPY_FLAGS = -DFLOPPY_SUPPORT -I$(TOP)/../libfloppy
|
|
|
|
BLOCK_FLAGS = -DBLOCK_SUPPORT -I$(TOP)/../libblock
|
2007-10-10 21:13:35 +00:00
|
|
|
MAP_FLAGS = -DMAP_SUPPORT -I$(TOP)/../libmap -I$(TOP)/../libemile
|
2007-09-01 21:49:54 +00:00
|
|
|
|
2005-11-26 08:53:39 +00:00
|
|
|
all: $(LIBRARIES)
|
|
|
|
|
2007-09-01 21:49:54 +00:00
|
|
|
scsi/libstream.a::
|
|
|
|
test -e scsi || mkdir scsi
|
|
|
|
$(MAKE) -C scsi -f $(TOP)/Makefile TOP=$(TOP) LIBRARY=libstream.a CPPFLAGS="$(CPPFLAGS) \
|
2008-04-12 22:27:13 +00:00
|
|
|
$(SCSI_FLAGS) $(CONTAINER_FLAGS) $(BLOCK_FLAGS) $(ISO9660_FLAGS) $(MAP_FLAGS) \
|
|
|
|
$(EXT2_FLAGS)" libstream.a
|
2005-11-26 08:53:39 +00:00
|
|
|
|
|
|
|
floppy/libstream.a::
|
|
|
|
test -e floppy || mkdir floppy
|
2007-09-01 21:49:54 +00:00
|
|
|
$(MAKE) -C floppy -f $(TOP)/Makefile TOP=$(TOP) LIBRARY=libstream.a \
|
|
|
|
CPPFLAGS="$(CPPFLAGS) $(FLOPPY_FLAGS) $(BLOCK_FLAGS)" libstream.a
|
|
|
|
|
|
|
|
full/libstream.a::
|
|
|
|
test -e full || mkdir full
|
|
|
|
$(MAKE) -C full -f $(TOP)/Makefile TOP=$(TOP) LIBRARY=libstream.a \
|
|
|
|
CPPFLAGS="$(CPPFLAGS) $(SCSI_FLAGS) $(CONTAINER_FLAGS) \
|
2008-04-12 22:27:13 +00:00
|
|
|
$(ISO9660_FLAGS) $(FLOPPY_FLAGS) $(BLOCK_FLAGS) $(MAP_FLAGS) \
|
|
|
|
$(EXT2_FLAGS)" libstream.a
|
2005-11-21 23:55:56 +00:00
|
|
|
|
2007-09-06 22:09:11 +00:00
|
|
|
include $(TOP)/../tools.mk
|
2005-11-21 23:55:56 +00:00
|
|
|
include $(TOP)/../Rules.mk
|