76 lines
1.8 KiB
Plaintext
76 lines
1.8 KiB
Plaintext
#
|
|
# Plain general makefile, for ultradefrag compilations
|
|
# Host Linux, target Linux on PowerPc 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=gcc
|
|
LD=ld
|
|
AR=ar
|
|
INCL=-I/usr/include -Iinclude
|
|
COPT=-DPPGC=1 -O2
|
|
GCCOPT=-DPPGC=1 -O2
|
|
LIB1=/usr/local/lib
|
|
LIB2=/usr/local/lib/gcc/powerpc-none-linux-gnuspe/4.3.2
|
|
NTFS=/usr/include/ntfs-3g
|
|
|
|
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
|
|
|
|
all : udefrag
|
|
|
|
console.a :
|
|
cd console; make -f console.ppc console.a
|
|
|
|
udefrag.a :
|
|
cd dll/udefrag; make -f udefrag.ppc udefrag.a
|
|
|
|
zenwinx.a :
|
|
cd dll/zenwinx; make -f zenwinx.ppc zenwinx.a
|
|
|
|
wincalls.a :
|
|
cd wincalls; make -f wincalls.ppc wincalls.a
|
|
|
|
clean :
|
|
cd console; make -f console.ppc clean
|
|
cd dll/udefrag; make -f udefrag.ppc clean
|
|
cd dll/zenwinx; make -f zenwinx.ppc clean
|
|
cd wincalls; make -f wincalls.ppc clean
|
|
|
|
udefrag : $(A)
|
|
$(LD) -dynamic-linker /lib/ld.so.1 -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/.libs/libntfs-3g.so \
|
|
-lgcc -L$(LIB2) -L$(LIB1) -lc -lm -lpthread -lncurses \
|
|
$(LIB2)/crtend.o $(LIB1)/crtn.o > udefrag.map
|
|
|
|
#udefrag : $(A)
|
|
# $(GCC) console/console.a dll/udefrag/udefrag.a dll/zenwinx/zenwinx.a \
|
|
# wincalls/wincalls.a $(NTFS)/libntfs-3g/.libs/libntfs-3g.so \
|
|
# -lm -lpthread -lncurses -o udefrag
|