mirror of
https://github.com/cc65/cc65.git
synced 2025-01-26 17:36:57 +00:00
Makefile cleanup. Among other things, allow use of the --as-needed linker flag
by rearranging arguments for the linker. git-svn-id: svn://svn.cc65.org/cc65/trunk@3922 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
4c88db2d4b
commit
823d0b7636
@ -2,6 +2,11 @@
|
||||
# gcc Makefile for ar65
|
||||
#
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# The executable to build
|
||||
EXE = ar65
|
||||
|
||||
# Library dir
|
||||
COMMON = ../common
|
||||
|
||||
@ -27,28 +32,28 @@ OBJS = add.o \
|
||||
LIBS = $(COMMON)/common.a
|
||||
|
||||
|
||||
EXECS = ar65
|
||||
# ------------------------------------------------------------------------------
|
||||
# Makefile targets
|
||||
|
||||
# Main target - must be first
|
||||
.PHONY: all
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
all : $(EXECS)
|
||||
all: $(EXE)
|
||||
include .depend
|
||||
else
|
||||
all: depend
|
||||
@$(MAKE) -f make/gcc.mak all
|
||||
endif
|
||||
|
||||
|
||||
|
||||
ar65: $(OBJS) $(LIBS)
|
||||
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
|
||||
$(EXE): $(OBJS) $(LIBS)
|
||||
$(CC) $^ $(LDFLAGS) -o $@
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi
|
||||
|
||||
clean:
|
||||
$(RM) *~ core
|
||||
$(RM) *~ core.* *.map
|
||||
|
||||
zap: clean
|
||||
$(RM) *.o $(EXECS) .depend
|
||||
$(RM) *.o $(EXE) .depend
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Make the dependencies
|
||||
|
@ -2,6 +2,11 @@
|
||||
# gcc Makefile for ca65
|
||||
#
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# The executable to build
|
||||
EXE = ca65
|
||||
|
||||
# Library dir
|
||||
COMMON = ../common
|
||||
|
||||
@ -55,43 +60,43 @@ OBJS = anonname.o \
|
||||
symtab.o \
|
||||
token.o \
|
||||
toklist.o \
|
||||
ulabel.o
|
||||
ulabel.o
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# List of all macro files
|
||||
|
||||
INCS = atari.inc \
|
||||
cbm.inc \
|
||||
cpu.inc \
|
||||
generic.inc \
|
||||
cpu.inc \
|
||||
generic.inc \
|
||||
longbranch.inc
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
LIBS = $(COMMON)/common.a
|
||||
|
||||
EXECS = ca65
|
||||
# ------------------------------------------------------------------------------
|
||||
# Makefile targets
|
||||
|
||||
# Main target - must be first
|
||||
.PHONY: all
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
all : $(EXECS)
|
||||
all: $(EXE)
|
||||
include .depend
|
||||
else
|
||||
all: depend
|
||||
@$(MAKE) -f make/gcc.mak all
|
||||
endif
|
||||
|
||||
ca65: $(INCS) $(OBJS) $(LIBS)
|
||||
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
|
||||
$(EXE): $(INCS) $(OBJS) $(LIBS)
|
||||
$(CC) $(OBJS) $(LIBS) $(LDFLAGS) -o $@
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi
|
||||
|
||||
inc: $(INCS)
|
||||
|
||||
clean:
|
||||
rm -f *~ core *.lst
|
||||
$(RM) *~ core.* *.map
|
||||
|
||||
zap: clean
|
||||
rm -f *.o $(EXECS) $(INCS) .depend
|
||||
$(RM) *.o $(EXE) $(INCS) .depend
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Make the dependencies
|
||||
|
@ -110,11 +110,11 @@ all: depend
|
||||
endif
|
||||
|
||||
$(EXE): $(OBJS) $(LIBS)
|
||||
$(CC) $(LDFLAGS) -o $(EXE) $(CFLAGS) $(OBJS) $(LIBS)
|
||||
$(CC) $^ $(LDFLAGS) -o $@
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi
|
||||
|
||||
clean:
|
||||
$(RM) *~ core *.map
|
||||
$(RM) *~ core.* *.map
|
||||
|
||||
zap: clean
|
||||
$(RM) *.o $(EXE) .depend
|
||||
|
@ -2,6 +2,11 @@
|
||||
# Makefile for the cl65 compile&link utility
|
||||
#
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# The executable to build
|
||||
EXE = cl65
|
||||
|
||||
# Library dir
|
||||
COMMON = ../common
|
||||
|
||||
@ -23,29 +28,28 @@ OBJS = error.o \
|
||||
|
||||
LIBS = $(COMMON)/common.a
|
||||
|
||||
EXECS = cl65
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Makefile targets
|
||||
|
||||
# Main target - must be first
|
||||
.PHONY: all
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
all : $(EXECS)
|
||||
all: $(EXE)
|
||||
include .depend
|
||||
else
|
||||
all: depend
|
||||
@$(MAKE) -f make/gcc.mak all
|
||||
endif
|
||||
|
||||
|
||||
cl65: $(OBJS) $(LIBS)
|
||||
$(CC) $(LDFLAGS) -o cl65 $(OBJS) $(LIBS)
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) cl65 ; fi
|
||||
$(EXE): $(OBJS) $(LIBS)
|
||||
$(CC) $^ $(LDFLAGS) -o $@
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi
|
||||
|
||||
clean:
|
||||
$(RM) *~ core
|
||||
$(RM) *~ core.* *.map
|
||||
|
||||
zap: clean
|
||||
$(RM) *.o $(EXECS) .depend
|
||||
|
||||
$(RM) *.o $(EXE) .depend
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Make the dependencies
|
||||
|
@ -2,6 +2,11 @@
|
||||
# gcc Makefile for co65
|
||||
#
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# The executable to build
|
||||
EXE = co65
|
||||
|
||||
# Library dir
|
||||
COMMON = ../common
|
||||
|
||||
@ -20,28 +25,28 @@ OBJS = convert.o \
|
||||
|
||||
LIBS = $(COMMON)/common.a
|
||||
|
||||
EXECS = co65
|
||||
# ------------------------------------------------------------------------------
|
||||
# Makefile targets
|
||||
|
||||
# Main target - must be first
|
||||
.PHONY: all
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
all : $(EXECS)
|
||||
all: $(EXE)
|
||||
include .depend
|
||||
else
|
||||
all: depend
|
||||
@$(MAKE) -f make/gcc.mak all
|
||||
endif
|
||||
|
||||
|
||||
|
||||
co65: $(OBJS) $(LIBS)
|
||||
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
|
||||
$(EXE): $(OBJS) $(LIBS)
|
||||
$(CC) $^ $(LDFLAGS) -o $@
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi
|
||||
|
||||
clean:
|
||||
$(RM) *~ core *.lst
|
||||
$(RM) *~ core.* *.map
|
||||
|
||||
zap: clean
|
||||
$(RM) *.o $(EXECS) .depend
|
||||
$(RM) *.o $(EXE) .depend
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Make the dependencies
|
||||
|
@ -1,7 +1,12 @@
|
||||
#
|
||||
#
|
||||
# gcc Makefile for da65
|
||||
#
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# The executable to build
|
||||
EXE = da65
|
||||
|
||||
# Library dir
|
||||
COMMON = ../common
|
||||
|
||||
@ -33,29 +38,28 @@ OBJS = asminc.o \
|
||||
LIBS = $(COMMON)/common.a
|
||||
|
||||
|
||||
EXECS = da65
|
||||
# ------------------------------------------------------------------------------
|
||||
# Makefile targets
|
||||
|
||||
# Main target - must be first
|
||||
.PHONY: all
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
all : $(EXECS)
|
||||
all: $(EXE)
|
||||
include .depend
|
||||
else
|
||||
all: depend
|
||||
@$(MAKE) -f make/gcc.mak all
|
||||
endif
|
||||
|
||||
|
||||
|
||||
da65: $(OBJS) $(LIBS)
|
||||
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
|
||||
$(EXE): $(OBJS) $(LIBS)
|
||||
$(CC) $^ $(LDFLAGS) -o $@
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi
|
||||
|
||||
clean:
|
||||
$(RM) *~ core *.map
|
||||
$(RM) *~ core.* *.map
|
||||
|
||||
zap: clean
|
||||
$(RM) *.o $(EXECS) .depend
|
||||
|
||||
$(RM) *.o $(EXE) .depend
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Make the dependencies
|
||||
|
@ -2,6 +2,11 @@
|
||||
# gcc Makefile for grc
|
||||
#
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# The executable to build
|
||||
EXE = grc
|
||||
|
||||
COMMON = ../common
|
||||
|
||||
CFLAGS = -g -O2 -Wall -W -std=c89 -I$(COMMON)
|
||||
@ -11,30 +16,30 @@ EBIND = emxbind
|
||||
|
||||
OBJS = grc.o
|
||||
|
||||
EXECS = grc
|
||||
|
||||
LIBS = $(COMMON)/common.a
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Makefile targets
|
||||
|
||||
# Main target - must be first
|
||||
.PHONY: all
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
all : $(EXECS)
|
||||
all: $(EXE)
|
||||
include .depend
|
||||
else
|
||||
all: depend
|
||||
@$(MAKE) -f make/gcc.mak all
|
||||
endif
|
||||
|
||||
|
||||
|
||||
grc: $(OBJS) $(LIBS)
|
||||
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
|
||||
$(EXE): $(OBJS) $(LIBS)
|
||||
$(CC) $^ $(LDFLAGS) -o $@
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi
|
||||
|
||||
clean:
|
||||
$(RM) *~ core *.lst
|
||||
$(RM) *~ core.* *.map
|
||||
|
||||
zap: clean
|
||||
$(RM) *.o $(EXECS) .depend
|
||||
$(RM) *.o $(EXE) .depend
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Make the dependencies
|
||||
|
@ -2,6 +2,11 @@
|
||||
# gcc Makefile for ld65
|
||||
#
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# The executable to build
|
||||
EXE = ld65
|
||||
|
||||
# Library dir
|
||||
COMMON = ../common
|
||||
|
||||
@ -75,37 +80,31 @@ INCS = apple2.inc \
|
||||
supervision.inc \
|
||||
vic20.inc
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
LIBS = $(COMMON)/common.a
|
||||
|
||||
|
||||
EXECS = ld65
|
||||
# ------------------------------------------------------------------------------
|
||||
# Makefile targets
|
||||
|
||||
# Main target - must be first
|
||||
.PHONY: all
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
all : $(EXECS)
|
||||
all: $(EXE)
|
||||
include .depend
|
||||
else
|
||||
all: depend
|
||||
@$(MAKE) -f make/gcc.mak all
|
||||
endif
|
||||
|
||||
|
||||
|
||||
ld65: $(INCS) $(OBJS) $(LIBS)
|
||||
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
|
||||
|
||||
inc: $(INCS)
|
||||
$(EXE): $(INCS) $(OBJS) $(LIBS)
|
||||
$(CC) $(OBJS) $(LIBS) $(LDFLAGS) -o $@
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi
|
||||
|
||||
clean:
|
||||
$(RM) *~ core *.map
|
||||
|
||||
zap: clean
|
||||
$(RM) *.o $(INCS) $(EXECS) .depend
|
||||
$(RM) *~ core.* *.map
|
||||
|
||||
zap: clean
|
||||
$(RM) *.o $(INCS) $(EXE) .depend
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Make the dependencies
|
||||
|
@ -3,6 +3,11 @@
|
||||
#
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# The executable to build
|
||||
EXE = od65
|
||||
|
||||
# Library dir
|
||||
COMMON = ../common
|
||||
|
||||
@ -19,25 +24,25 @@ OBJS = dump.o \
|
||||
|
||||
LIBS = $(COMMON)/common.a
|
||||
|
||||
EXE = od65
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Makefile targets
|
||||
|
||||
# Main target - must be first
|
||||
.PHONY: all
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
all: $(EXE)
|
||||
all: $(EXE)
|
||||
include .depend
|
||||
else
|
||||
all: depend
|
||||
@$(MAKE) -f make/gcc.mak all
|
||||
endif
|
||||
|
||||
|
||||
$(EXE): $(OBJS)
|
||||
$(CC) $(LDFLAGS) -o $(EXE) $(CFLAGS) $(OBJS) $(LIBS)
|
||||
$(EXE): $(OBJS) $(LIBS)
|
||||
$(CC) $^ $(LDFLAGS) -o $@
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi
|
||||
|
||||
clean:
|
||||
$(RM) *~ core *.map
|
||||
$(RM) *~ core.* *.map
|
||||
|
||||
zap: clean
|
||||
$(RM) *.o $(EXE) .depend
|
||||
|
@ -2,6 +2,11 @@
|
||||
# gcc Makefile for sim65
|
||||
#
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# The executable to build
|
||||
EXE = sim65
|
||||
|
||||
# Library dir
|
||||
COMMON = ../common
|
||||
|
||||
@ -28,34 +33,32 @@ OBJS = addrspace.o \
|
||||
|
||||
LIBS = $(COMMON)/common.a
|
||||
|
||||
EXECS = sim65
|
||||
# ------------------------------------------------------------------------------
|
||||
# Makefile targets
|
||||
|
||||
# Main target - must be first
|
||||
.PHONY: all
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
all: $(EXECS) chips
|
||||
all: $(EXE) 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
|
||||
$(EXE): $(OBJS) $(LIBS)
|
||||
$(CC) $^ $(LDFLAGS) -o $@
|
||||
@if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi
|
||||
|
||||
.PHONY: chips
|
||||
chips:
|
||||
@$(MAKE) -C chips -f make/gcc.mak
|
||||
|
||||
|
||||
clean:
|
||||
@$(MAKE) -C chips -f make/gcc.mak clean
|
||||
$(RM) *~ core *.lst
|
||||
$(RM) *~ core.* *.map
|
||||
|
||||
zap: clean
|
||||
@$(MAKE) -C chips -f make/gcc.mak zap
|
||||
$(RM) *.o $(EXECS) .depend
|
||||
zap: clean
|
||||
$(RM) *.o $(EXE) .depend
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Make the dependencies
|
||||
|
Loading…
x
Reference in New Issue
Block a user