# # Plain general makefile, for ultradefrag compilations # Host Linux, target Linux on ARM 32-bit # # restrict suffixes list to the ones we define .SUFFIXES : # this list controls the ordering of rule evaluation .SUFFIXES : .c .cpp .java .s .o .l .map # cancel implicit rule for building .c from .l (lex file) : %.c : %.l # cancel implicit rule for building . from .c % : %.c # cancel implicit rule for building . from .s % : %.s GCC=/shared/arm/gcc/bin/arm-linux-gnueabihf-gcc LD=/shared/arm/gcc/bin/arm-linux-gnueabihf-ld AR=/shared/arm/gcc/bin/arm-linux-gnueabihf-ar INCL=-I$(NTFS) -I$(NTFS)/include/ntfs-3g \ -I/shared/arm/root/usr/include \ -I../include -I../dll/zenwinx COPT=-DARGC=1 -DNOMEMCHK=1 -O2 GCCOPT=-DARGC=1 -DNOMEMCHK=1 -O2 LIB1=/shared/arm/root/usr/lib/arm-linux-gnueabihf LIB2=/shared/arm/root/usr/lib/gcc/arm-linux-gnueabihf/4.9 NTFS=/shared/ntfs/ntfslowprof H=../include/linux.h ../include/compiler.h ntfs-3g.h \ ../dll/zenwinx/ntndk.h ../dll/zenwinx/ntfs.h ../dll/zenwinx/zenwinx.h O=wincalls.o ntfs-3g.o curses.o .c.s : $(GCC) $(COPT) $(INCL) -S $*.c .cpp.o : $(GCC) $(GCCOPT) $(INCL) -c -o$*.o $*.cpp .c.o : $(GCC) $(GCCOPT) $(INCL) -c -o$*.o $*.c .cpp.s : $(GCC) $(GCCOPT) $(INCL) -S -o$*.s $*.cpp .o .o. : $(LD) -dynamic-linker /lib/ld-linux-armhf.so.3 -o $* \ -s $(LIB1)/crt1.o $(LIB1)/crti.o $(LIB2)/crtbegin.o $*.o \ -lgcc -L$(LIB2) -L$(LIB1) -lc -lm -lpthread \ $(LIB2)/crtend.o $(LIB1)/crtn.o .o.map : $(LD) -dynamic-linker /lib/ld-linux-armhf.so.3 -o $* -M \ $(LIB1)/crt1.o $(LIB1)/crti.o $(LIB2)/crtbegin.o $*.o \ -lgcc -L$(LIB2) -L$(LIB1) -lc -lm -lpthread \ $(LIB2)/crtend.o $(LIB1)/crtn.o > $*.map all : wincalls.a wincalls.o wincalls.s : $(H) wincalls.c ntfs-3g.o ntfs-3g.s : $(H) ntfs-3g.c curses.o curses.s : $(H) curses.c wincalls.a : $(O) rm -f wincalls.a $(AR) -rv wincalls.a $(O) clean : rm -f $(O) rm -f *.s *.asm *.l *.map