had to be replaced by calls to stat, because fileno is no longer available when forcing the compiler into pure c89 (or c99) mode. git-svn-id: svn://svn.cc65.org/cc65/trunk@3683 b7a2c559-68d2-44c3-8de9-860c34a00d81
69 lines
1.2 KiB
Makefile
69 lines
1.2 KiB
Makefile
#
|
|
# gcc Makefile for sim65
|
|
#
|
|
|
|
# Library dir
|
|
COMMON = ../common
|
|
|
|
CFLAGS = -g -O2 -Wall -W -std=c89 -I$(COMMON)
|
|
CC = gcc
|
|
EBIND = emxbind
|
|
LDFLAGS =
|
|
|
|
OBJS = addrspace.o \
|
|
callback.o \
|
|
cfgdata.o \
|
|
chip.o \
|
|
chippath.o \
|
|
config.o \
|
|
cpucore.o \
|
|
cputype.o \
|
|
error.o \
|
|
global.o \
|
|
location.o \
|
|
main.o \
|
|
memory.o \
|
|
scanner.o \
|
|
system.o
|
|
|
|
LIBS = $(COMMON)/common.a
|
|
|
|
EXECS = sim65
|
|
|
|
.PHONY: all
|
|
ifeq (.depend,$(wildcard .depend))
|
|
all: $(EXECS) chips
|
|
include .depend
|
|
else
|
|
all: depend
|
|
@$(MAKE) -f make/gcc.mak all
|
|
endif
|
|
|
|
|
|
sim65: $(OBJS) $(LIBS)
|
|
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) -ldl
|
|
@if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
|
|
|
|
.PHONY: chips
|
|
chips:
|
|
@$(MAKE) -C chips -f make/gcc.mak
|
|
|
|
|
|
clean:
|
|
@$(MAKE) -C chips -f make/gcc.mak clean
|
|
$(RM) *~ core *.lst
|
|
|
|
zap: clean
|
|
@$(MAKE) -C chips -f make/gcc.mak zap
|
|
$(RM) *.o $(EXECS) .depend
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# Make the dependencies
|
|
|
|
.PHONY: depend dep
|
|
depend dep: $(OBJS:.o=.c)
|
|
@echo "Creating dependency information"
|
|
$(CC) $(CFLAGS) -MM $^ > .depend
|
|
|
|
|