mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-16 00:15:08 +01:00
32 lines
698 B
Makefile
32 lines
698 B
Makefile
|
# Quick'n'dirty makefile [BC] v2
|
||
|
|
||
|
ifeq ($(strip $(DEVKITPPC)),)
|
||
|
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
|
||
|
endif
|
||
|
|
||
|
include $(DEVKITPPC)/wii_rules
|
||
|
|
||
|
LIBOGC_INC := $(DEVKITPRO)/libogc/include
|
||
|
LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/wii
|
||
|
|
||
|
CFLAGS := -O3 $(MACHDEP) -I$(LIBOGC_INC) -DHAVE_CONFIG_H
|
||
|
|
||
|
LIB := ntfs
|
||
|
CFILES := $(wildcard *.c)
|
||
|
OFILES := $(CFILES:.c=.o)
|
||
|
ARC := lib$(LIB).a
|
||
|
HDR := ntfs.h
|
||
|
|
||
|
all : $(OFILES)
|
||
|
$(AR) -r $(ARC) $(OFILES)
|
||
|
|
||
|
clean :
|
||
|
rm -f $(OFILES) $(ARC)
|
||
|
|
||
|
install :
|
||
|
mkdir -p $(LIBOGC_LIB) $(LIBOGC_INC)
|
||
|
cp -f $(ARC) $(LIBOGC_LIB)/
|
||
|
cp -f $(HDR) $(LIBOGC_INC)/
|
||
|
|
||
|
%.o : %.c
|
||
|
$(CC) $(CFLAGS) -c $< -o $@
|