mirror of
https://github.com/Maschell/PushA_NX.git
synced 2024-11-22 16:09:15 +01:00
22 lines
563 B
Makefile
22 lines
563 B
Makefile
|
ifeq ($(strip $(LIBTRANSISTOR_HOME)),)
|
||
|
$(error "Please set LIBTRANSISTOR_HOME in your environment. export LIBTRANSISTOR_HOME=<path to libtransistor>")
|
||
|
endif
|
||
|
|
||
|
PROGRAM := hello
|
||
|
OBJ := hello.o draw.o input.o
|
||
|
|
||
|
include $(LIBTRANSISTOR_HOME)/libtransistor.mk
|
||
|
|
||
|
all: $(PROGRAM).nro
|
||
|
|
||
|
%.o: %.c
|
||
|
$(CC) $(CC_FLAGS) -Wno-pointer-arith -c -o $@ $<
|
||
|
|
||
|
%.o: %.S
|
||
|
$(AS) $(AS_FLAGS) $< -filetype=obj -o $@
|
||
|
|
||
|
$(PROGRAM).nro.so: ${OBJ} $(LIBTRANSITOR_NRO_LIB) $(LIBTRANSISTOR_COMMON_LIBS)
|
||
|
$(LD) $(LD_FLAGS) -o $@ ${OBJ} $(LIBTRANSISTOR_NRO_LDFLAGS)
|
||
|
|
||
|
clean:
|
||
|
rm -rf *.o *.nso *.nro *.so
|