mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-20 20:22:38 +02:00
41 lines
1.6 KiB
Plaintext
41 lines
1.6 KiB
Plaintext
include $(DEVKITPRO)/devkitA64/base_tools
|
|
|
|
#---------------------------------------------------------------------------------
|
|
%.a:
|
|
#---------------------------------------------------------------------------------
|
|
@echo $(notdir $@)
|
|
@rm -f $@
|
|
$(AR) -rc $@ $^
|
|
|
|
|
|
#---------------------------------------------------------------------------------
|
|
%.o: %.cpp
|
|
@echo $(notdir $<)
|
|
$(CXX) -MMD -MP -MF $(DEPSDIR)/$*.d $(CXXFLAGS) -c $< -o $@ $(ERROR_FILTER)
|
|
|
|
#---------------------------------------------------------------------------------
|
|
%.o: %.c
|
|
@echo $(notdir $<)
|
|
$(CC) -MMD -MP -MF $(DEPSDIR)/$*.d $(CFLAGS) -c $< -o $@ $(ERROR_FILTER)
|
|
|
|
#---------------------------------------------------------------------------------
|
|
%.o: %.s
|
|
@echo $(notdir $<)
|
|
$(CC) -MMD -MP -MF $(DEPSDIR)/$*.d -x assembler-with-cpp $(ASFLAGS) -c $< -o $@ $(ERROR_FILTER)
|
|
|
|
#---------------------------------------------------------------------------------
|
|
%.o: %.S
|
|
@echo $(notdir $<)
|
|
$(CC) -MMD -MP -MF $(DEPSDIR)/$*.d -x assembler-with-cpp $(ASFLAGS) -c $< -o $@ $(ERROR_FILTER)
|
|
|
|
#---------------------------------------------------------------------------------
|
|
# canned command sequence for binary data
|
|
#---------------------------------------------------------------------------------
|
|
define bin2o
|
|
bin2s $< | $(AS) -o $(@)
|
|
echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(<F) | tr . _)`.h
|
|
echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(<F) | tr . _)`.h
|
|
echo "extern const u32" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(<F) | tr . _)`.h
|
|
endef
|
|
|