View Single Post
  #2   Spotlight this post!  
Unread 05-14-2010, 11:24 PM
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: DIY Static Library

Absolutely. I've created two libraries for our team. Although I sure that you can create them from the Workbench environment, I find it is easier from the command line. I've included the Makefile, but if you don't speak Makefile, then ask questions and I'll try to answer them.

Here is the Makefile that I used to create the CANJaguarLib.a:

# source files.
SRC = CANJaguar.cpp

OBJ = $(SRC:.cpp=.o)

OUT = CANJaguarLib.a

# include directories
INCLUDES = -I. -I$(WIND_BASE)/target/h -IC:/Team_116_2010/Jaguar -IC:/windriver/
vxworks-6.3/target/h/WPIlib

# C++ compiler flags (-g -O2 -Wall)
CCFLAGS = -g

# compiler
CCC = ccppc

# library paths
LIBS = -LC:/Team_116_2010/lib -lm

# compile flags
LDFLAGS = -g
.SUFFIXES: .cpp

default: dep $(OUT)

.cpp.o:
$(CCC) $(INCLUDES) $(CCFLAGS) -c $< -o $@

$(OUT): $(OBJ)
arppc rcs $(OUT) $(OBJ)

depend: dep

dep:

clean:
rm -f $(OBJ) $(OUT) Makefile.bak
Reply With Quote