.SUFFIXES:
.SUFFIXES: .c .o
##############################################################################
# QNXSDK path
QNXSDK = C:\QNXsdk
TGT_LOCATION = $(QNXSDK)\target\qnx6
# Include paths probably need some modifications
INCPATHS = -I$(QNXSDK)\target\qnx6\usr\include \
-I$(QNXSDK)\target\qnx6\usr\include\sys
# Library paths
LIBPATHS = -L. -L$(QNXSDK)\target\qnx6\x86\lib
# Libraries
CLIB = $(QNXSDK)\host\win32\x86\usr\lib\gcc-lib\ntox86\2.95.3\libgcc.a
LIBS = -dy -lcpp -lm $(CLIB) -dy -lc -dn -Bstatic -lc \
$(QNXSDK)/target/qnx6/x86/lib/crtend.o $(QNXSDK)/target/qnx6/x86/lib/crtn.o
CPP = $(QNXSDK)\host\win32\x86\usr\lib\gcc-lib\ntox86\2.95.3\cpp0.exe
CC = $(QNXSDK)\host\win32\x86\usr\lib\gcc-lib\ntox86\2.95.3\cc1.exe
CCS = $(QNXSDK)\host\win32\x86\usr\bin\ntox86-as.exe
LD = $(QNXSDK)\host\win32\x86\usr\bin\ntox86-ld.exe
ARC = $(QNXSDK)\host\win32\x86\usr\bin\ar rv
QNXOBJECTS = $(QNXSDK)\target\qnx6\x86\lib\crt1.o \
$(QNXSDK)\target\qnx6\x86\lib\crti.o \
$(QNXSDK)\target\qnx6\x86\lib\crtbegin.o
PLATFORM = -D__QNX__ -D__QNXNTO__ -D__GNUC__=2 -D__GNUC_MINOR__=95 -D__GNUG__=2 -D__unix__ \
-D__unix -D__ELF__ -D__X86__ -D__i386__ -D__STDC__ -D__LITTLEENDIAN__ -Asystem(unix) \
-Asystem(nto) -Asystem(qnx) -Asystem(qnxnto) -Acpu(386) -Acpu(i386) -Amachine(i386)
##############################################################################
# Optimization flags for compiler
OPTIMIZE = -quiet -fno-builtin -fhonor-std -fno-default-inline -Wall \
-Wno-parentheses -mpentium -m80387 -fsigned-char -O3
##############################################################################
# The following settings should need no modifications
OBJECTS = blur.o boundary.o convmask.o hopfield.o image.o \
maincmd.o threshold.o weights.o xmalloc.o lambda.o
SOURCES = $(OBJECTS:.o=.c)
PROGRAM = refocit
CFLAGS = $(OPTIMIZE)
CPPFLAGS = $(INCPATHS) -DNDEBUG $(PLATFORM)
LDFLAGS = -b elf32-i386 -m i386nto --dynamic-linker /usr/lib/ldqnx.so.2 $(QNXOBJECTS) $(LIBPATHS)
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS)
$(LD) $(LDFLAGS) $(OBJECTS) -o $@ $(LIBS)
instal: $(PROGRAM)
copy $(PROGRAM) $(TGT_LOCATION)
clean:
-del /Q /F $(OBJECTS) $(PROGRAM)
.c.o:
$(CPP) $(CPPFLAGS) $*.c $*.i
$(CC) $(CFLAGS) $*.i -o $*.s
$(CCS) $*.s -o $@
-del /Q /F $*.i $*.s
$(OBJECTS): Makefile.qnx
|