Menu

Better Makefile

bbosen
2020-04-27
2020-04-27
  • bbosen

    bbosen - 2020-04-27

    Here's the complete text of our updated Makefile. (This is for version Lac08p02). It is unchanged except for the addition of "-fPIE" as an additional compiler argument:

    OBJS=3ds.o aiobject.o audio.o cockpit.o common.o conf.o dirs.o effects.o fileloader.o FlightModel.o gl.o glland.o land.o loader_tga.o main.o mathtab.o menu.o mission.o model.o NetworkApi.o object.o objload.o pilots.o vertexarray.o
    
    CXX=g++ -Ofast -g0 -fPIE
    
    LIBS=`pkg-config --libs SDL_mixer` -lglut -lGL -lglut -lGLU
    
    Lac08p02: $(OBJS)
        g++ -o Lac08p02 $(LIBS) $(OBJS)
        cp Lac08p02 bin/Release/Lac08p02
        chmod +x bin/Release/Lac08p02
    
    clean:
        @rm -f *.o
        @rm Lac08p02
    

    We now plan to have future versions of our Makefile enhanced with this little change. If your attempt to use the Makefile fails part-way through, you should try inserting "-fPIE" into your Makefile as shown above.

     
  • Demon

    Demon - 2023-04-27
    Post awaiting moderation.

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.