Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/replicant/Wasabi/Makefile

43 lines
1.0 KiB
Makefile
Raw Normal View History

2024-09-24 12:54:57 +00:00
MODULE_NAME := Wasabi
CPPSOURCES := api.cpp ServiceManager.cpp SysCallbacks.cpp
LIBRARY_FILENAME := lib$(MODULE_NAME).a
OUTPUT_PATH := ../build/$(MODULE_NAME)
ARCHIVE_PATH := ../build/lib
LIBRARY_FILEPATH := ../build/lib/$(LIBRARY_FILENAME)
CPPOBJS := $(patsubst %.cpp,$(OUTPUT_PATH)/%.o,$(CPPSOURCES))
CPPDEPS := $(patsubst %.o,$(OUTPUT_PATH)/%.d,$(CPPOBJS))
COBJS := $(patsubst %.c,$(OUTPUT_PATH)/%.o,$(CSOURCES))
CDEPS := $(patsubst %.o,$(OUTPUT_PATH)/%.d,$(COBJS))
OBJS := $(CPPOBJS) $(COBJS)
DEPS := $(CPPDEPS) $(CDEPS)
CFLAGS=-I..
CPPFLAGS := ${CFLAGS}
build: build-dir $(LIBRARY_FILEPATH)
build-dir:
@mkdir -p $(OUTPUT_PATH) > /dev/null 2> /dev/null
@mkdir -p $(ARCHIVE_PATH) > /dev/null 2> /dev/null
dep:
@rm ${DEPS}
$(OUTPUT_PATH)/%.o: %.cpp
#@echo Compiling $*.cpp
@$(CXX) $(CPPFLAGS) -MMD -MF $(OUTPUT_PATH)/$*.d -MT $(OUTPUT_PATH)/$*.o -c $*.cpp -o $(OUTPUT_PATH)/$*.o
$(LIBRARY_FILEPATH): ${OBJS}
$(AR) rcs $@ ${OBJS}
clean:
-rm -f ${OBJS} $(LIBRARY_FILENAME) ${DEPS}
-include $(DEPS)