#Copy
CP = cp
#Compiler
CC = m68k-elf-gcc
#Compiler flags
CFLAGS = -g -m68000 -msep-data
#Compiler option
COPT = -I../include
#Linker
LD = m68k-elf-g++
#Link flags
LDFLAGS = -Wl,-elf2flt
#Archiver
AR = m68k-elf-ar
#Archive flags
AFLAGS = -cruv
#Module name
MODULE = libeace.a
#Libraries
OBJS = Time_Value.o \
Select_Reactor.o \
Select_Reactor_Base.o \
Handler_Set.o \
Reactor.o \
Signal.o \
OS.o \
Timer_Queue.o \
Event_Handler.o
.cpp.o: $@.cpp
$(CC) $(COPT) $(CFLAGS) -c $^
$(MODULE): $(OBJS)
$(AR) $(AFLAGS) $(MODULE) $(OBJS)
$(CP) $(MODULE) ../lib
all: $(MODULE)
clean:
rm -f $(OBJS)
rm -f $(MODULE)
b) 生成应用程序的模板:
#Copy
CP = cp
#Compiler
CC = m68k-elf-gcc
#Linker
LD = m68k-elf-g++
#Compiler Flags
CFLAGS = -g -m68000 -msep-data
#Options
COPT = -I../eace/include
#Link Flags
LDFLAGS = -Wl,-elf2flt
#System library
SYSLIBS = -lc -lstdc++ -lgcc
#ACE libraray
ACELIBS = ../eace/lib/libeace.a
#Module name
MODULE = eacetest
#Libraries
OBJS = test.o
.cpp.o: $@.cpp
$(CC) $(COPT) $(CFLAGS) -c $^
$(MODULE): $(OBJS) $(ACELIBS)
$(LD) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(ACELIBS) $(SYSLIBS)
$(CP) $(MODULE) /
all: $(MODULE)
clean:
rm -f $(MODULE).gdb
rm -f $(OBJS)
rm -f $(MODULE)
阅读(1326) | 评论(0) | 转发(0) |