20 lines
380 B
Makefile
20 lines
380 B
Makefile
TARGET = lib/libguisan.a
|
|
|
|
AR = ar
|
|
|
|
DIRS =$(shell find ./src -maxdepth 3 -type d)
|
|
SOURCE = $(foreach dir,$(DIRS),$(wildcard $(dir)/*.cpp))
|
|
OBJS = $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SOURCE)))
|
|
|
|
CPPFLAGS +=-I./include
|
|
|
|
.PHONY : all clean
|
|
|
|
$(TARGET) : $(OBJS)
|
|
$(AR) cr $(TARGET) $(OBJS)
|
|
|
|
all : $(TARGET)
|
|
|
|
clean :
|
|
find . -name *.o |xargs rm -f
|
|
rm -rf $(TARGET)
|