简单的Makefile编译ArNetworking的例子

OBJS = main.o

TARGET = main

CC = g++

CFLAGS = -fPIC -g -Wall

ARIA_INCLUDE = -I/usr/local/Aria/include -I/usr/local/Aria/ArNetworking/include

ARIA_LINK = -L/usr/local/Aria/lib -lAria -lArNetworking -lpthread -ldl -lrt


$(TARGET):$(OBJS)

    $(CC) $(CFLAGS) $(ARIA_INCLUDE) $< -o $@ @(ARIA_LINK)


%.o:%.cpp

    $(CC) $(CFLAGS) $(ARIA_INCLUDE) -c $<


clean:

    rm -rf $(TARGET) $(OBJS)

    @echo "Clean up ompleted!";

你可能感兴趣的:(简单的Makefile编译ArNetworking的例子)