redquark-amiberry-rb/guisan-dev/Makefile
2018-12-11 21:32:46 +01:00

23 lines
459 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)))
DEPS = $(SOURCE:%.cpp=%.d)
CPPFLAGS +=-I./include $(SDL_CFLAGS) -MD -MT $@ -MF $(@:%.o=%.d)
.PHONY : all clean
$(TARGET) : $(OBJS)
$(AR) cr $(TARGET) $(OBJS)
all : $(TARGET)
clean :
rm -f $(OBJS) $(DEPS)
rm -f $(TARGET)
-include $(DEPS)