# 编译静态/动态库 GCC = gcc AR = ar CFLAGS += -Wall -g -fPIC LIB += -ljson-c LIB += -lcrypto #OBJ = libweb.a OBJ = libweb.so all: $(OBJ) libweb.so: auth.o utiles.o $(GCC) -o $@ $(CFLAGS) -shared $^ $(LIB) libweb.a: auth.o utiles.o $(AR) -crv -o $@ $^ %.o: %.c $(GCC) $(CFLAGS) -c $< -o $@ clean: $(RM) *.o $(OBJ)
# 使用 静态/动态库 GCC = gcc CFLAGS += -Wall LIB += ./lib/libweb.a #LIB += -L./lib/ -lweb LIB += -ljson-c LIB += -lcrypto OBJ = login all: $(OBJ) login: login.o $(GCC) $(CFLAGS) -o $@ $^ $(LIB) %.o: %.c $(GCC) $(CFLAGS) -o $@ -c $< clean: $(RM) *.o $(OBJ)