Creating a simple Makefile to build a shared library

前端 未结 5 1446
天涯浪人
天涯浪人 2021-01-30 21:37

I am trying to create a very basic hand crafted Makefile to create a shared library to illustrate a point.

This is what I have so far:

SHELL = /bin/sh
CC         


        
5条回答
  •  不思量自难忘°
    2021-01-30 22:08

    The solution was to modify the XXFLAGS as follows:

    FLAGS        = # -std=gnu99 -Iinclude
    CFLAGS       = -fPIC -g #-pedantic -Wall -Wextra -ggdb3
    LDFLAGS      = -shared
    

提交回复
热议问题