EMILE/apple_driver/Makefile

53 lines
1.0 KiB
Makefile
Raw Normal View History

2006-10-19 17:34:18 +00:00
#
#
# (c) 2004,2005 Laurent Vivier <Laurent@lvivier.info>
#
#
TOP = $(shell pwd)
VPATH = $(TOP)
2007-02-02 20:05:19 +00:00
CPPFLAGS = -DARCH_M68K -I$(TOP)/../libmacos -Wa,-I$(TOP)/../libmacos
2006-10-19 17:34:18 +00:00
ASFLAGS = -I$(TOP)
2007-02-02 20:05:19 +00:00
CFLAGS += $(OPT_CFLAGS) -nostdlib -nodefaultlibs -Wall -Werror -Wno-multichar -fpic -O2
LIBS = -L$(TOP)/../libunix -lunix -L$(TOP)/../libmacos -lmacos
2006-10-19 17:34:18 +00:00
2007-08-22 16:23:15 +00:00
SOURCES = head.S main.c console.c vga.c font_8x16.c
2007-02-05 12:14:28 +00:00
2007-08-22 16:23:15 +00:00
HEADERS = vga.h console.h misc.h
2006-10-20 18:54:49 +00:00
PROGRAMS = apple_driver
2007-02-02 20:05:19 +00:00
CLEAN = apple_driver.o
2006-10-19 17:34:18 +00:00
.PHONY: all
all: apple_driver
2007-02-02 20:05:19 +00:00
include $(TOP)/../Rules.mk
2007-02-05 12:41:40 +00:00
DISTFILES += ld.script
2006-10-19 17:34:18 +00:00
apple_driver: apple_driver.o
$(OBJCOPY) -j .text -j .data -j .rodata -j .got \
-O binary apple_driver.o apple_driver
2007-02-02 20:05:19 +00:00
apple_driver.o: $(OBJS) ld.script
$(LD) -T ld.script -o apple_driver.o $(OBJS) $(LIBS)
2006-10-19 17:34:18 +00:00
.S.o:
2007-02-02 20:05:19 +00:00
$(AS) $(ASFLAGS) -o $@ $^
.c.o:
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^
2006-10-19 17:34:18 +00:00
install::
install -d $(DESTDIR)/$(PREFIX)/lib/emile/
2006-10-20 18:54:49 +00:00
install apple_driver $(DESTDIR)/$(PREFIX)/lib/emile/apple_driver
2006-10-19 17:34:18 +00:00
uninstall::
rm -f $(DESTDIR)/$(PREFIX)/lib/emile/apple_driver