Hi,
z80asm has the nice -d switch which avoids to compile files which do not need to.
Would it be possible to add same feature to zcc C compiler ? that would save me some precious time while compiling
Thank you,
Arnaud
compile only if .o older than .c .. for zcc
Need to save those precious seconds I guessnorecess wrote:z80asm has the nice -d switch which avoids to compile files which do not need to.
Would it be possible to add same feature to zcc C compiler ? that would save me some precious time while compiling
The first thought I have is this task is usually handled by make....
My thoughts are the same as Alvins; that this should be handled by make which can do proper dependency management, here's the makefile I used for zsock:
Note the use of the -preserve flag - this prevents the zcc_opt.def from being deleted between unit compilations.
I'm unsure why I decided to create the final executable from .opt files rather than .o files however.
Code: Select all
TARGET = +z88
#TARGET = +cpm
CC = zcc
CFLAGS = -vn -DNETSTAT -DINACTIVETO=1200 -make-app -O3 -preserve
INCLUDES = -I. -I../include
LIBS = -lnetdev -lmalloc
LDFLAGS =
SOURCES := setup.c icmp.c ip.c udp.c tcp.c udp_dom.c \
handler_call.c net_utils.c loopback.c pbuf.c socket.c socket_int.c \
pppset.c slip_dev.c z80.c time.c tcp_int.c ping.c lowlevel2.c device.c
ifeq (+z88,$(TARGET))
SOURCES += config_read.c main.c app.c
LDFLAGS = -create-app -nt
LIBS += -lz88
endif
ifeq (+cpm,$(TARGET))
SOURCES += unixmain.c
endif
ASMS := $(SOURCES:.c=.opt)
all: $(ASMS)
$(CC) $(TARGET) $(LDFLAGS) -o zsock $(CFLAGS) $(ASMS) $(LIBS)
%.opt: %.c zsock.h
$(CC) $(TARGET) $(CFLAGS) -a $(INCLUDES) $<
clean:
rm -f *.opt *~ zsock zsock.62 zsock.63 zcc_opt.def
I'm unsure why I decided to create the final executable from .opt files rather than .o files however.