mirror of
https://github.com/Maschell/PushA_NX.git
synced 2024-11-21 23:49:16 +01:00
23 lines
571 B
Makefile
23 lines
571 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) -lSDL2 -o $@ ${OBJ} $(LIBTRANSISTOR_NRO_LDFLAGS)
|
|
|
|
clean:
|
|
rm -rf *.o *.nso *.nro *.so
|