Probs: makefile for esql-c
Posted in 1995
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
We are using version 4 of Informix 4GL as a preprocessor for our ec-files. The resulting objectfiles are then stored in a library (dblib.a) in the local directory. The problem now is, even if we only change 1 ec-sourcefile, all files in the lib are compiled again. Since we have a lot of files in the lib, the turnaround time is inacceptable. I know the bug is in the Makefile, but I can't figure it out. Please help me and give me a hint or even better send me a corrected version of the Makefile, where only the changed ec-files are compiled and put into the lib. ============= part of our Makefile ================================ INFORMIXDIR= /opt/lib/informix SHELL = /usr/bin/ksh # Flags und Makros C4GL= c4gl FGLCFLAGS = -I$(INFORMIXDIR)/incl -I../incl CFLAGS = -L$(INFORMIXDIR)/lib -W2 -kansi -DSYSLOG -I$(INFORMIXDIR)/incl -I../incl LDFLAGS = -L$(INFORMIXDIR)/lib COPT = -c -I$(INFORMIXDIR)/incl c.a: $(CC) $(CFLAGS) -c $< $(AR) $(ARFLAGS) $@ $*.o # Rules for ESQL-compiler SUFFIXES: .ec~ .ec ec.o: $(C4GL) $(FGLCFLAGS) -e $*.ec $(CC) $(CFLAGS) -c $*.c ec.c: $(C4GL) $(FGLCFLAGS) -e $< #.ec: # $(C4GL) $(COPT) $*.ec # $(CC) $(CFLAGS) -o $@ $*.o $(LDFLAGS) #################################################### LOCAL=dblib.a LIB=dblib.a LIBOBJ=$(LIB)(abschlag_d.o) \\ $(LIB)(abt_d.o) \\ $(LIB)(zpinl_d.o) OBJ=abschlag_d.o \\ abt_d.o \\ zpinl_d.o SRC=$(OBJ:.o=.c) local: $(LOCAL) @make $(LOCAL) $(LOCAL): $(LIB) $(LIB): $(LIBOBJ) $(LIBOBJ): $(SRC) abschlag_d.o: dbinform.h dbpkinf.h zpinl_d.o: dbinform.h dbpkinf.h dbinform.h: dbpkinf.h: ====================== End of Makefile ============================== Thank you Klaus Rehm c0922@rrzc1.rz.uni-regensburg.de