libs:
$(MAKE) -C $(DIR_LIBSRC)
-$(PROG): $(OBJS) $(LIBS)
- $(CC) $^ $(LDFLAGS) -o $(PROG)
+$(PROG): $(OBJS) $(STGLIBS)
+ $(CC) $^ $(LIBS) $(LDFLAGS) -o $(PROG)
clean:
rm -f deps $(PROG) *.o tags *.*~ .OS
$(MAKE) -C $(DIR_LIBSRC) includes
@>deps ;\
for file in $(SRCS); do\
- echo "`$(CC) $(CFLAGS) $(SEARCH_DIRS) -MM $$file` Makefile" >> deps ;\
- echo -e '\t$$(CC) -c $$< $(CFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\
+ echo "`$(CC) $(CXXFLAGS) $(SEARCH_DIRS) -MM $$file` Makefile" >> deps ;\
+ echo -e '\t$$(CC) -c $$< $(CXXFLAGS) $(SEARCH_DIRS) $(DEFS)' >> deps ;\
done
echo -n "Checking for -lexpat... "
echo "int main() { return 0; }" > build_check.c
-gcc build_check.c -lexpat -o fake > /dev/null 2> /dev/null
+gcc $CXXFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null
if [ $? != 0 ]
then
CHECK_EXPAT=no