X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fda65%2Fmake%2Fgcc.mak;h=35e2805c7723a6048662513a9dab1960c7c978e0;hb=823d0b763663d2148ef8fbf6c680607cd8be8b74;hp=7932d0e6c2992902237f9ebb0e3ed5c4ea7a8acc;hpb=8db6dcd414e3e679ddf2427e966ca3baae6f1957;p=cc65 diff --git a/src/da65/make/gcc.mak b/src/da65/make/gcc.mak index 7932d0e6c..35e2805c7 100644 --- a/src/da65/make/gcc.mak +++ b/src/da65/make/gcc.mak @@ -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