Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotations to customize generated Makefile #29

Closed
brice-morin opened this issue Feb 22, 2013 · 0 comments
Closed

Annotations to customize generated Makefile #29

brice-morin opened this issue Feb 22, 2013 · 0 comments

Comments

@brice-morin
Copy link
Collaborator

We should be able to customize the generated Makefile, typically when we wrap existing libraries. For example, the Makefile below integrates a MongoDB component. I had to manually insert 3 elements: -lmongoc, -lbson and -DMONGO_HAVE_STDINT=1

CC = cc
LIBS = -lpthread -lmongoc -lbson 
CFLAGS = -O -w
SRCS = SerialProxy.c ClockTimer.c LinuxSerial.c MessageSerializer.c WeatherStation.c LinuxClock.c MessageDeserializer.c LinuxDB.c RaspiNode.c runtime.c
OBJS = SerialProxy.o ClockTimer.o LinuxSerial.o MessageSerializer.o WeatherStation.o LinuxClock.o MessageDeserializer.o LinuxDB.o RaspiNode.o runtime.o

all : RaspiNode

.c.o :
    ${CC} ${CFLAGS} -c $< -DMONGO_HAVE_STDINT=1

RaspiNode : $(OBJS)
    $(CC) -o $@ $(OBJS) $(LIBS) -lm

clean:
    rm -f *.o *~ RaspiNode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants