Menu

makefile

Thomas1970
2007-10-02
2013-08-09
  • Thomas1970

    Thomas1970 - 2007-10-02

    I have changed the makefile.
    What do you think of it?

    CC       = gcc

    BIN      = lib/libnmea.a
    MODULES  = generate generator parse parser tok context time info math sentence

    OBJ      = $(MODULES:%=build/%.o)
    LINKOBJ  = $(OBJ) $(RES)
    INCS     = -I"include"

    .PHONY: all all-before all-after clean clean-custom

    all: all-before $(BIN) all-after

    clean: clean-custom
        rm -f $(LINKOBJ) $(BIN)

    $(BIN): $(LINKOBJ)
        $(CC) -G $^ -o $@

    build/%.o: src/%.c
        $(CC) $(INCS) -c $< -o $@

     
    • Tim

      Tim - 2007-10-03

      I`ll check it and add to the next release.

       
  • Henry Luis

    Henry Luis - 2013-08-09

    It would be nice if the Makefile also builds .so libraries (with -fPIC).

     

Log in to post a comment.