mirror of
https://github.com/cc65/cc65.git
synced 2024-06-07 23:29:39 +00:00
a561fc35bb
git-svn-id: svn://svn.cc65.org/cc65/trunk@19 b7a2c559-68d2-44c3-8de9-860c34a00d81
50 lines
727 B
Makefile
50 lines
727 B
Makefile
#
|
|
# gcc Makefile for the binutils common stuff
|
|
#
|
|
|
|
CFLAGS = -g -O2 -Wall
|
|
CC = gcc
|
|
LDFLAGS =
|
|
LIB = common.a
|
|
|
|
|
|
|
|
OBJS = bitops.o \
|
|
hashstr.o \
|
|
xsprintf.o
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# Dummy targets
|
|
|
|
.PHONY: all
|
|
ifeq (.depend,$(wildcard .depend))
|
|
all: lib
|
|
include .depend
|
|
else
|
|
all: depend
|
|
@$(MAKE) -f make/gcc.mak all
|
|
endif
|
|
|
|
.PHONY: lib
|
|
lib: $(LIB)
|
|
|
|
$(LIB): $(OBJS)
|
|
$(AR) rs $(LIB) $?
|
|
|
|
clean:
|
|
rm -f *~ core *.map
|
|
|
|
zap: clean
|
|
rm -f *.o $(LIB) .depend
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# Make the dependencies
|
|
|
|
.PHONY: depend dep
|
|
depend dep: $(OBJS:.o=.c)
|
|
@echo "Creating dependency information"
|
|
$(CC) -MM $^ > .depend
|
|
|
|
|