mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-08 21:21:48 +00:00
37 lines
1.6 KiB
Makefile
37 lines
1.6 KiB
Makefile
#---------------------------------------------------------------------------------
|
|
%.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/' -e 's/[^A-Za-z0-9_]/_/g')`"_end[];" > `(echo $(<F) | tr . _)`.h
|
|
echo "extern const u8" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' -e 's/[^A-Za-z0-9_]/_/g')`"[];" >> `(echo $(<F) | tr . _)`.h
|
|
echo "extern const u32" `(echo $(<F) | sed -e 's/^\([0-9]\)/_\1/' -e 's/[^A-Za-z0-9_]/_/g')`_size";" >> `(echo $(<F) | tr . _)`.h
|
|
endef
|