Creating Makefile that compiles multiple C files for use in Minix -
i trying create makefile compiles multiple c files use in minix. how change makefile compiles multiple files @ same time? below current state of makefile.
cflags = -d_posix_source ldflags = cc = cc ld = cc prog = test objs = test.o $(prog): $(objs) $(ld) $(ldflags) $(objs) -o $(prog) clean: rm -rf $(prog) $(objs)
i thought list other programs after prog , objs such as
prog = test test2 objs = test.o test2.o
but didn't work. ideas? in advance.
split way:
prog1 = test prog2 = test2 obj1 = test.o obj2 = test2.o $(prog1): $(obj1) $(ld) $(ldflags) $(obj1) -o $(prog1) $(prog2): $(obj2) $(ld) $(ldflags) $(obj2) -o $(prog2)
etc
Comments
Post a Comment