Click here to Skip to main content
15,939,853 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i compile this make file,it gives error type name exected,illegal character $,@. Please any one can help in how to use this make file?

OBJS = generate.obj factgen.obj represen.obj timegen.obj tmdates.obj writers.obj brangen.obj custygen.obj params.obj random.obj strname.obj zipcity.obj

generate: $(OBJS)
    g++ $(OBJS) -lg++ -lm -o $@

generate.obj: timegen.h zipcity.h custygen.h brangen.h params.h represen.h tmdates.h
    g++ -c

factgen.obj: factgen.h brangen.h random.h represen.h zipcity.h params.h tmdates.h
    g++ -c

represen.obj: represen.h tmdates.h strname.h
    g++ -c

tmdates.obj: tmdates.h
    g++ -c

timegen.obj: timegen.h tmdates.h
    g++ -c

writers.obj: writers.h tmdates.h
    g++ -c

brangen.obj: brangen.h random.h represen.h zipcity.h params.h tmdates.h
    g++ -c

custygen.obj: custygen.h represen.h zipcity.h params.h tmdates.h
    g++ -c

params.obj: params.h strname.h tmdates.h
    g++ -c

random.obj: random.h
    g++ -c

strname.obj: strname.h
    g++ -c

zipcity.obj: zipcity.h random.h
    g++ -c

1 solution

You must NOT compile a Makefile.
You have to use the make command to build the project:
just type

at the shell prompt (make sure to be in the folder containing the Makefile file).
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900