mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-28 20:29:19 +00:00
Allows to share EMILE directory between several archs
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
0b05a2eff7
commit
4de7597e14
32
Makefile
32
Makefile
@ -9,6 +9,14 @@ include config.mk
|
|||||||
include tools.mk
|
include tools.mk
|
||||||
include kernel.mk
|
include kernel.mk
|
||||||
|
|
||||||
|
SYSTEM:=$(shell uname -s)
|
||||||
|
MACHINE:=$(shell uname -m)
|
||||||
|
ifeq ($(SYSTEM), Linux)
|
||||||
|
NATIVE:=$(MACHINE)-linux
|
||||||
|
else
|
||||||
|
NATIVE:=$(MACHINE)-$(SYSTEM)
|
||||||
|
endif
|
||||||
|
|
||||||
# Target
|
# Target
|
||||||
|
|
||||||
.PHONY: first libemile libblock libiso9660 libiso9660-m68k libgzip-m68k tools \
|
.PHONY: first libemile libblock libiso9660 libiso9660-m68k libgzip-m68k tools \
|
||||||
@ -220,13 +228,13 @@ libconfig-m68k::
|
|||||||
$(MAKE) -C libconfig all TARGET=m68k-linux
|
$(MAKE) -C libconfig all TARGET=m68k-linux
|
||||||
|
|
||||||
libconfig::
|
libconfig::
|
||||||
$(MAKE) -C libconfig all TARGET=native CROSS_COMPILE=$(CROSS_COMPILE)
|
$(MAKE) -C libconfig all TARGET=$(NATIVE) CROSS_COMPILE=$(CROSS_COMPILE)
|
||||||
|
|
||||||
libiso9660::
|
libiso9660::
|
||||||
$(MAKE) -C libiso9660 all TARGET=native CROSS_COMPILE=$(CROSS_COMPILE)
|
$(MAKE) -C libiso9660 all TARGET=$(NATIVE) CROSS_COMPILE=$(CROSS_COMPILE)
|
||||||
|
|
||||||
libext2::
|
libext2::
|
||||||
$(MAKE) -C libext2 all TARGET=native CROSS_COMPILE=$(CROSS_COMPILE)
|
$(MAKE) -C libext2 all TARGET=$(NATIVE) CROSS_COMPILE=$(CROSS_COMPILE)
|
||||||
|
|
||||||
libcontainer::
|
libcontainer::
|
||||||
$(MAKE) -C libcontainer all TARGET=m68k-linux
|
$(MAKE) -C libcontainer all TARGET=m68k-linux
|
||||||
@ -238,10 +246,10 @@ libgzip-m68k::
|
|||||||
$(MAKE) -C libgzip all TARGET=m68k-linux
|
$(MAKE) -C libgzip all TARGET=m68k-linux
|
||||||
|
|
||||||
libgzip::
|
libgzip::
|
||||||
$(MAKE) -C libgzip all TARGET=native CROSS_COMPILE=$(CROSS_COMPILE)
|
$(MAKE) -C libgzip all TARGET=$(NATIVE) CROSS_COMPILE=$(CROSS_COMPILE)
|
||||||
|
|
||||||
libemile::
|
libemile::
|
||||||
$(MAKE) -C libemile all CROSS_COMPILE=$(CROSS_COMPILE)
|
$(MAKE) -C libemile all TARGET=$(NATIVE) CROSS_COMPILE=$(CROSS_COMPILE)
|
||||||
|
|
||||||
libfloppy::
|
libfloppy::
|
||||||
$(MAKE) -C libfloppy all CC=$(M68K_CC) AS=$(M68K_AS)
|
$(MAKE) -C libfloppy all CC=$(M68K_CC) AS=$(M68K_AS)
|
||||||
@ -253,13 +261,13 @@ libstream::
|
|||||||
$(MAKE) -C libstream all CC=$(M68K_CC) AS=$(M68K_AS)
|
$(MAKE) -C libstream all CC=$(M68K_CC) AS=$(M68K_AS)
|
||||||
|
|
||||||
libmap::
|
libmap::
|
||||||
$(MAKE) -C libmap all TARGET=native CROSS_COMPILE=$(CROSS_COMPILE)
|
$(MAKE) -C libmap all TARGET=$(NATIVE) CROSS_COMPILE=$(CROSS_COMPILE)
|
||||||
|
|
||||||
libmap-m68k::
|
libmap-m68k::
|
||||||
$(MAKE) -C libmap all TARGET=m68k-linux
|
$(MAKE) -C libmap all TARGET=m68k-linux
|
||||||
|
|
||||||
tools:: libemile libiso9660 libext2 libgzip libconfig libmap
|
tools:: libemile libiso9660 libext2 libgzip libconfig libmap
|
||||||
$(MAKE) -C tools all CROSS_COMPILE=$(CROSS_COMPILE)
|
$(MAKE) -C tools all CROSS_COMPILE=$(CROSS_COMPILE) TARGET=$(NATIVE)
|
||||||
|
|
||||||
tools-install:: tools
|
tools-install:: tools
|
||||||
$(MAKE) -C tools install
|
$(MAKE) -C tools install
|
||||||
@ -302,15 +310,15 @@ libstream-clean:
|
|||||||
$(MAKE) -C libstream clean
|
$(MAKE) -C libstream clean
|
||||||
|
|
||||||
libiso9660-clean::
|
libiso9660-clean::
|
||||||
$(MAKE) -C libiso9660 clean TARGET=native
|
$(MAKE) -C libiso9660 clean TARGET=$(NATIVE)
|
||||||
$(MAKE) -C libiso9660 clean TARGET=$(KARCH)-linux
|
$(MAKE) -C libiso9660 clean TARGET=$(KARCH)-linux
|
||||||
|
|
||||||
libext2-clean::
|
libext2-clean::
|
||||||
$(MAKE) -C libext2 clean TARGET=native
|
$(MAKE) -C libext2 clean TARGET=$(NATIVE)
|
||||||
$(MAKE) -C libext2 clean TARGET=$(KARCH)-linux
|
$(MAKE) -C libext2 clean TARGET=$(KARCH)-linux
|
||||||
|
|
||||||
libconfig-clean::
|
libconfig-clean::
|
||||||
$(MAKE) -C libconfig clean TARGET=native
|
$(MAKE) -C libconfig clean TARGET=$(NATIVE)
|
||||||
$(MAKE) -C libconfig clean TARGET=$(KARCH)-linux
|
$(MAKE) -C libconfig clean TARGET=$(KARCH)-linux
|
||||||
|
|
||||||
libcontainer-clean::
|
libcontainer-clean::
|
||||||
@ -320,11 +328,11 @@ libblock-clean::
|
|||||||
$(MAKE) -C libblock clean
|
$(MAKE) -C libblock clean
|
||||||
|
|
||||||
libgzip-clean::
|
libgzip-clean::
|
||||||
$(MAKE) -C libgzip clean TARGET=native
|
$(MAKE) -C libgzip clean TARGET=$(NATIVE)
|
||||||
$(MAKE) -C libgzip clean TARGET=$(KARCH)-linux
|
$(MAKE) -C libgzip clean TARGET=$(KARCH)-linux
|
||||||
|
|
||||||
libmap-clean::
|
libmap-clean::
|
||||||
$(MAKE) -C libmap clean TARGET=native
|
$(MAKE) -C libmap clean TARGET=$(NATIVE)
|
||||||
$(MAKE) -C libmap clean TARGET=$(KARCH)-linux
|
$(MAKE) -C libmap clean TARGET=$(KARCH)-linux
|
||||||
|
|
||||||
tools-clean:
|
tools-clean:
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
TOP=$(shell pwd)
|
TOP=$(shell pwd)
|
||||||
|
VPATH=$(TOP)
|
||||||
|
|
||||||
CPPFLAGS = $(CROSS_COMPILE_CPPFLAGS)
|
CPPFLAGS = $(CROSS_COMPILE_CPPFLAGS)
|
||||||
LDFLAGS = $(CROSS_COMPILE_LDFLAGS)
|
LDFLAGS = $(CROSS_COMPILE_LDFLAGS)
|
||||||
@ -22,9 +23,11 @@ SOURCES = emile_checksum.c emile_first_get_param.c \
|
|||||||
HEADERS = emile.h libemile.h bootblock.h
|
HEADERS = emile.h libemile.h bootblock.h
|
||||||
|
|
||||||
CFLAGS = -Wall -Werror -g
|
CFLAGS = -Wall -Werror -g
|
||||||
CPPFLAGS = -I../libmacos -I../libcontainer -I../libstream -I../libconfig -I../libmap -I.
|
CPPFLAGS = -I$(TOP)/../libmacos -I$(TOP)/../libcontainer -I$(TOP)/../libstream -I$(TOP)/../libconfig -I$(TOP)/../libmap -I$(TOP)
|
||||||
|
|
||||||
all: $(LIBRARY)
|
all:
|
||||||
|
test -d $(TARGET) || mkdir $(TARGET)
|
||||||
|
$(MAKE) -C $(TARGET) -f $(TOP)/Makefile $(LIBRARY) TOP=$(TOP)
|
||||||
|
|
||||||
include $(TOP)/../tools.mk
|
include $(TOP)/../tools.mk
|
||||||
include $(TOP)/../Rules.mk
|
include $(TOP)/../Rules.mk
|
||||||
|
@ -22,14 +22,17 @@ HEADERS = device.h
|
|||||||
DISTFILES =$(HEADERS) $(SOURCES) Makefile
|
DISTFILES =$(HEADERS) $(SOURCES) Makefile
|
||||||
|
|
||||||
CPPFLAGS = $(CROSS_COMPILE_CPPFLAGS) -DSIGNATURE="\"$(SIGNATURE)\"" -DPREFIX=\"$(PREFIX)\" \
|
CPPFLAGS = $(CROSS_COMPILE_CPPFLAGS) -DSIGNATURE="\"$(SIGNATURE)\"" -DPREFIX=\"$(PREFIX)\" \
|
||||||
-I../libemile -I../libiso9660 -I../libgzip -I../libstream \
|
-I$(TOP)/../libemile -I$(TOP)/../libiso9660 -I$(TOP)/../libgzip -I$(TOP)/../libstream \
|
||||||
-I../libcontainer -I../libmacos -DFATFREE -DNO_GZCOMPRESS \
|
-I$(TOP)/../libcontainer -I$(TOP)/../libmacos -DFATFREE -DNO_GZCOMPRESS \
|
||||||
-I../libconfig -I../libmap -I../libext2
|
-I$(TOP)/../libconfig -I$(TOP)/../libmap -I$(TOP)/../libext2
|
||||||
|
|
||||||
CFLAGS = -Wall -Werror -g
|
CFLAGS = -Wall -Werror -g
|
||||||
LDLIBS = $(CROSS_COMPILE_LDFLAGS) -L../libemile -lemile -L../libiso9660/native -liso9660 -L../libgzip/native -lgzip -L../libconfig/native -lconfig -L../libmap/native -lmap -L../libext2/native -lext2
|
LDLIBS = $(CROSS_COMPILE_LDFLAGS) -L$(TOP)/../libemile/$(TARGET) -lemile -L$(TOP)/../libiso9660/$(TARGET) -liso9660 -L$(TOP)/../libgzip/$(TARGET) -lgzip -L$(TOP)/../libconfig/$(TARGET) -lconfig -L$(TOP)/../libmap/$(TARGET) -lmap -L$(TOP)/../libext2/$(TARGET) -lext2
|
||||||
|
|
||||||
|
all:
|
||||||
|
test -d $(TARGET) || mkdir $(TARGET)
|
||||||
|
$(MAKE) -C $(TARGET) -f $(TOP)/Makefile $(PROGRAMS) TOP=$(TOP) VPATH=$(TOP)
|
||||||
|
|
||||||
all: $(PROGRAMS)
|
|
||||||
|
|
||||||
emile-install: emile-install.o
|
emile-install: emile-install.o
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user