0

Hi,

I have been trying to compile open source projects since past few months with no success. I just don't know how to go about the entire thing. Readings over the internet have not helped much.

Some come with ./Configure and a Makefile while others with only a Makefile. How to use them to generate executables (or they have some other purpose :?:).

My machine currently has:

  • Windows XP
  • Mingw Compiler for C/C++
  • Cygwin

Do I need any other software?

Thanks!

Edited by iammirko: n/a

3
Contributors
5
Replies
7
Views
6 Years
Discussion Span
Last Post by iammirko
0

This time I am trying to compile the nullHttpd project. The project comes with around 9 source files and a Makefile. The contents read as follows:

# Makefile for Null httpd
CC      = gcc
CFLAGS  = -Wall -O2 -s -I./include
LDFLAGS = -lpthread
OBJECTS = cgi.o config.o files.o format.o http.o main.o server.o

all:
	rm -f *.o
	make httpd

httpd: $(OBJECTS)
	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o ../httpd/bin/httpd
	@echo Make httpd is complete.

clean:
	rm -f ../httpd/bin/httpd *.o *~

Edited by iammirko: n/a

0

Makefiles are ways to effectively reduce the user burden by just executing one script which will perform the compilation for you.

In order to run a makefile you will need to do the following

1) Make Sure that your MinGw compiler directory is in the windows global Environment variables.

If that is done.

you could just use the Command prompt (START>RUN>CMD) and go to the directory where the codes are present and type

'make' to execute it

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.