@@ -186,7 +186,8 @@ WIIKEYBLIBOBJ := usbkeyboard.o keyboard.o ukbdmap.o wskbdutil.o
186186
187187
188188
189- all : wii cube
189+ PLATFORMS ?= wii cube
190+ all : $(PLATFORMS )
190191
191192# ---------------------------------------------------------------------------------
192193wii : gc/ogc/libversion.h
@@ -298,7 +299,7 @@ install-headers: gc/ogc/libversion.h
298299 @cp $(BASEDIR)/gc/wiikeyboard/*.h $(INCDIR)/wiikeyboard
299300
300301# ---------------------------------------------------------------------------------
301- install : wii cube install-headers
302+ install : $( PLATFORMS ) install-headers
302303# ---------------------------------------------------------------------------------
303304 @mkdir -p $(DESTDIR)$(DEVKITPRO)/libogc2
304305 @cp -frv include $(DESTDIR)$(DEVKITPRO)/libogc2
@@ -312,7 +313,7 @@ uninstall:
312313 @rm -frv $(DESTDIR)$(DEVKITPRO)/libogc2
313314
314315# ---------------------------------------------------------------------------------
315- dist : wii cube install-headers
316+ dist : $( PLATFORMS ) install-headers
316317# ---------------------------------------------------------------------------------
317318 @tar -C $(BASEDIR) --exclude-vcs --exclude-vcs-ignores --exclude .github \
318319 -cvjf $(BUILDDIR)/libogc2-src-$(VERSTRING).tar.bz2 .
@@ -321,17 +322,19 @@ dist: wii cube install-headers
321322 @tar -cvjf libogc2-$(VERSTRING).tar.bz2 include lib libogc_license.txt gamecube_rules wii_rules
322323
323324
324- LIBRARIES := $(OGCLIB ) .a $(MODLIB ) .a $(DBLIB ) .a $(TINYSMBLIB ) .a $(ASNDLIB ) .a $(AESNDLIB ) .a $(ISOLIB ) .a
325+ ifeq ($(strip $(LIBRARIES ) ) ,)
326+ LIBRARIES := ogc modplay db tinysmb asnd aesnd iso9660
325327
326328ifeq ($(PLATFORM ) ,cube)
327- LIBRARIES += $( BBALIB ) .a
329+ LIBRARIES += bba
328330endif
329331ifeq ($(PLATFORM ) ,wii)
330- LIBRARIES += $(BTELIB ) .a $(WIIUSELIB ) .a $(DILIB ) .a $(WIIKEYBLIB ) .a
332+ LIBRARIES += bte wiiuse di wiikeyboard
333+ endif
331334endif
332335
333336# ---------------------------------------------------------------------------------
334- libs : $(LIBRARIES )
337+ libs : $(foreach lib, $( LIBRARIES ) , $( LIBDIR ) /lib $( lib ) .a )
335338# ---------------------------------------------------------------------------------
336339
337340# ---------------------------------------------------------------------------------
0 commit comments