86 lines
2.3 KiB
Plaintext
86 lines
2.3 KiB
Plaintext
#
|
|
# 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 \
|
|
-Iinclude
|
|
COPT=-DARGC=1 -O2
|
|
GCCOPT=-DARGC=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
|
|
|
|
A=console.a udefrag.a zenwinx.a wincalls.a
|
|
|
|
.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 : udefrag
|
|
|
|
console.a :
|
|
cd console; make -f console.arm console.a
|
|
|
|
udefrag.a :
|
|
cd dll/udefrag; make -f udefrag.arm udefrag.a
|
|
|
|
zenwinx.a :
|
|
cd dll/zenwinx; make -f zenwinx.arm zenwinx.a
|
|
|
|
wincalls.a :
|
|
cd wincalls; make -f wincalls.arm wincalls.a
|
|
|
|
clean :
|
|
cd console; make -f console.arm clean
|
|
cd dll/udefrag; make -f udefrag.arm clean
|
|
cd dll/zenwinx; make -f zenwinx.arm clean
|
|
cd wincalls; make -f wincalls.arm clean
|
|
|
|
udefrag : $(A)
|
|
$(LD) -dynamic-linker /lib/ld-linux-armhf.so.3 -o udefrag -M \
|
|
$(LIB1)/crt1.o $(LIB1)/crti.o $(LIB2)/crtbegin.o \
|
|
console/console.a dll/udefrag/udefrag.a dll/zenwinx/zenwinx.a \
|
|
wincalls/wincalls.a $(NTFS)/libntfs-3g/armlibntfs.a \
|
|
-lgcc -L$(LIB2) -L$(LIB1) -lc -lm -lpthread -lncurses -ltinfo \
|
|
$(LIB2)/crtend.o $(LIB1)/crtn.o > udefrag.map
|