Hacker News new | ask | show | jobs
by enriquto 2952 days ago
Often it is disheartening to bend make to your bidding. But cixl has a neatly arranged tree and the makefile to build it is trivial. The following lines suffice (and by running 'make test -j' you compile everything in parallel and run all the tests) :

    CFLAGS   = -Isrc -O2
    LDLIBS   = -ldl -lm

    SRC      = $(shell ls src/cixl/*.c src/cixl/lib/*.c)
    OBJ      = $(SRC:%.c=%.o)

    src/main : src/main.o $(OBJ)

    clean    : ; $(RM) $(OBJ) src/main

    test: src/main ; for i in tests/*; do ./src/main<$$i; done

would you accept such a patch in your project?
1 comments

Not bad; my make-fu was never that spectacular to begin with and it hasn't been aging well, this helps me a lot.

Sure thing, if you feel like giving the entire makefile the same treatment I'd be delighted to accept it.

Thanks for taking the time!