1 creating & updating makefile, 1 creating & updating makefile -4 – Solvline LemonIDE Ver 1.0c User Manual

Page 28

Advertising
background image

LemonIDE

TM

Chapter 5. Using IDE

5.3.1 Creating & Updating Makefile

If new source file is created or an existing source file in Project View has been altered, a makefile to compile source

file must be created. Makefile provide in DK Source can be reference to create a new makefile.

Below displays an example of creating a compile environment for makefile for source file, “hello.c” in “src” project,

under “Eddy_APPs”folder.

CROSS = /opt/lemonix/cdt/bin/arm-linux-
LDFLAGS += -L/opt/lemonix/cdt/lib -L/opt/lemonix/cdt/bin
IFLAGS += -I/opt/lemonix/cdt/include -I./include
CFLAGS = -O2 -g -Wall -Wno-nonnull
DEST

= ../../ramdisk/root/sbin

DEST_ETC= ../../ramdisk/root/etc

CC

= $(CROSS)gcc

STRIP = $(CROSS)strip
AR

= $(CROSS)ar


TARGET = hello ddns_agent udp def pinetd tcp_server tcp_client tcp_multiplex tcp_broadcast
detect portview upgrade eddy loopback rt-test gpio

LIBS

= -lrt SB_APIs/SB_APIs.a


all : $(TARGET)

hello : hello.o

rm -f $@

$(CC) $(CFLAGS) $(LDFLAGS) $(IFLAGS) -o $@ [email protected]

$(STRIP) $@

udp : udp.o

rm -f $@

$(CC) $(CFLAGS) $(LDFLAGS) $(IFLAGS) -o $@ [email protected] $(LIBS)

$(STRIP) $@

.

.

5-4

Advertising