makefiles - accumulate c files during once
i wish examination gcc whole way optimizations. i have pass c-files during once compiler frontend. however, i makefiles automate build process, i'm an consultant comes makefile magic.
how should i cgange makefile i wish accumulate (maybe even link) controlling only gcc?
for anxiety - makefile looks this:
libs = -lkernel32 -luser32 -lgdi32 -lopengl32
cflags = -wall
obj = 64bitmath.o \
monotone.o \
node_sort.o \
planesweep.o \
triangulate.o \
prim_combine.o \
welding.o \
test.o \
main.o
%.o : %.c
gcc -c $(cflags) $< -o $@
test: $(obj)
gcc -o $@ $^ $(cflags) $(libs)
Comments
Post a Comment