Home | History | Annotate | Line # | Download | only in exe
      1 #	$NetBSD: Makefile,v 1.5 2017/04/08 19:53:20 christos Exp $
      2 
      3 .include <bsd.own.mk>
      4 .include <bsd.obj.mk>
      5 .include <bsd.inc.mk>
      6 
      7 PROG=e32boot.exe
      8 
      9 SRCS=e32boot.cpp netbsd.cpp
     10 OBJS=$(SRCS:R:S/$/.o/g)
     11 
     12 IN=$(PROG:.exe=.in)
     13 MAP=$(PROG:.exe=.map)
     14 
     15 NOMAN=		#defined
     16 BINMODE= 444
     17 
     18 S=../../../../../
     19 
     20 CPPFLAGS=-c -nostdinc -Wall -Wno-ctor-dtor-privacy -O
     21 CPPFLAGS+=-mcpu=arm710
     22 CPPFLAGS+=-mapcs-32 -mshort-load-bytes -msoft-float -fcheck-new -fvtable-thunks
     23 CPPFLAGS+=-D__SYMBIAN32__ -D__PSISOFT32__ -D__GCC32__ -D__EPOC32__ -D__MARM__
     24 CPPFLAGS+=-U_UNICODE
     25 CPPFLAGS+=-I. -I../include/ -I-
     26 CPPFLAGS+=-I$(EPOC32_SDKDIR)/include/
     27 
     28 CFLAGS=-ffreestanding
     29 _CXXSEED=	# XXXXX
     30 
     31 HEAPMIN=0x80000
     32 HEAPMAX=0x8000000
     33 
     34 EPOC32_LIBRARY_PATH=$(EPOC32_SDKDIR)/Release/MARM/Rel/
     35 LIBS=$(EPOC32_LIBRARY_PATH)/EFSRV.LIB
     36 LIBS+=$(EPOC32_LIBRARY_PATH)/EUSER.LIB
     37 LIBS+=$(EPOC32_LIBRARY_PATH)/WS32.LIB
     38 
     39 
     40 all: check_epoc32_cross $(PROG)
     41 
     42 $(PROG): $(OBJS) $(IN)
     43 	${_MKTARGET_LINK}
     44 	$(LD) -s --base-file $(PROG:.exe=.bas) \
     45 	    -o $@ --whole-archive $(IN) --no-whole-archive $(LIBS)
     46 	TMP=. $(EXTERNAL_TOOLCHAIN)/bin/$(MACHINE_GNU_PLATFORM)-dlltool \
     47 	    -S $(AS) \
     48 	    --output-exp $(PROG:.exe=.exp) --base-file $(PROG:.exe=.bas) \
     49 	    $(IN) $(LIBS)
     50 	$(LD) -s -Map $(MAP) -o $@ $(PROG:.exe=.exp) \
     51 	    --whole-archive $(IN) --no-whole-archive $(LIBS)
     52 	mv $@ $@.tmp
     53 	$(PETRAN) $@.tmp $@ -heap $(HEAPMIN) $(HEAPMAX) \
     54 	    -nocall -uid1 0x1000007a -uid2 0x00000000 -uid3 0x00000000
     55 	rm $@.tmp $(PROG:.exe=.bas) $(PROG:.exe=.exp)
     56 
     57 $(IN): $(OBJS)
     58 	$(AR) r $@ $(OBJS)
     59 	$(RANLIB) $@
     60 
     61 clean:
     62 	rm -f $(PROG) $(OBJS) $(IN) $(MAP)
     63 	rm -f $(PROG:.exe=.bas) $(PROG:.exe=.exp)
     64 
     65 .include "${S}/conf/newvers_stand.mk"
     66 
     67 .include <bsd.files.mk>
     68