Skip to content

Commit fcf9ca7

Browse files
committed
allow parallel build
1 parent 5450b2b commit fcf9ca7

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

libctru/Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,12 @@ else
9191
endif
9292
#---------------------------------------------------------------------------------
9393

94-
export OFILES := $(addsuffix .o,$(BINFILES)) \
95-
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
94+
export OFILES_BIN := $(addsuffix .o,$(BINFILES))
95+
export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
96+
97+
export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES)))
98+
99+
export OFILES := $(OFILES_BIN) $(OFILES_SRC)
96100

97101
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
98102
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
@@ -153,8 +157,10 @@ DEPENDS := $(OFILES:.o=.d)
153157
#---------------------------------------------------------------------------------
154158
$(OUTPUT) : $(OFILES)
155159

160+
$(OFILES_SRC) : $(HFILES_BIN)
161+
156162
#---------------------------------------------------------------------------------
157-
%.bin.o : %.bin
163+
%.bin.o %_bin.h : %.bin
158164
#---------------------------------------------------------------------------------
159165
@echo $(notdir $<)
160166
@$(bin2o)

0 commit comments

Comments
 (0)