2012-04-29 11:03:06 +02:00
|
|
|
# Quick'n'dirty makefile [BC] v2
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-04-29 11:03:06 +02:00
|
|
|
ifeq ($(strip $(DEVKITPPC)),)
|
|
|
|
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
|
|
|
|
endif
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-04-29 11:03:06 +02:00
|
|
|
include $(DEVKITPPC)/wii_rules
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-04-29 11:03:06 +02:00
|
|
|
LIBOGC_INC := $(DEVKITPRO)/libogc/include
|
|
|
|
LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/wii
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-04-29 11:03:06 +02:00
|
|
|
CFLAGS := -O3 $(MACHDEP) -I$(LIBOGC_INC) -DHAVE_CONFIG_H
|
2012-04-22 19:40:21 +02:00
|
|
|
|
2012-04-29 11:03:06 +02:00
|
|
|
SOURCES := source
|
|
|
|
LIB := ntfs
|
|
|
|
CFILES := $(wildcard $(SOURCES)/*.c)
|
|
|
|
OFILES := $(CFILES:.c=.o)
|
|
|
|
ARC := lib$(LIB).a
|
|
|
|
HDR := ntfs.h
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-04-29 11:03:06 +02:00
|
|
|
all : $(OFILES)
|
|
|
|
$(AR) -r $(ARC) $(OFILES)
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-04-29 11:03:06 +02:00
|
|
|
clean :
|
|
|
|
rm -f $(OFILES) $(ARC)
|
2012-04-22 19:40:21 +02:00
|
|
|
|
2012-04-29 11:03:06 +02:00
|
|
|
install :
|
|
|
|
cp -f $(ARC) ../../lib
|
|
|
|
cp -f $(HDR) ../../include
|
|
|
|
cp -f ntfsfile_frag.h ../../include
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-04-29 11:03:06 +02:00
|
|
|
%.o : %.c
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|