removed code without effect
time_t represents the number of seconds since the birth of unix.
to deal with microseconds and friends, use
a) gettimeofday
b) struct timeval
+ − CC = gcc
+ − LD = ld
+ − YACC = bison -y
+ − FLEX = flex
+ − CFLAGS = -Wall -O2 -ansi -D_XOPEN_SOURCE=500
+ − LDFLAGS =
+ − INCLUDE = -Iinclude
+ −
+ − OBJECTS = main.o
+ − OBJECTS += parser.o
+ − OBJECTS += lexer.o
+ −
+ − TARGET = calc
+ −
+ − .SUFFIXES: .c .y .l
+ −
+ − .c.o:
+ − $(CC) -c $(CFLAGS) $(INCLUDE) $(CONFIG) $<
+ −
+ − .y.c:
+ − $(YACC) -d $< -o $@
+ −
+ − .l.c:
+ − $(FLEX) -o $@ $<
+ −
+ − all: $(TARGET)
+ −
+ −
+ − $(TARGET): $(OBJECTS)
+ − $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
+ −
+ − .PHONY: distclean clean
+ −
+ − clean:
+ − rm -f *.[oae];
+ − rm -f *~;
+ − rm -f parser.h
+ −
+ − distclean:
+ − make clean
+ − rm -f $(TARGET)