# compile main.c and link it dynamically to the libmicrohttpd library # (libmicrohttpd.so must be in the library search path) # (this Makefile is for GNU make) CC = gcc CFLAGS = -Wall -g -O2 LDFLAGS = -lmicrohttpd OBJFILES = main.o handlers.o DEPS = handlers.h all: nasuh-server %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) nasuh-server: $(OBJFILES) $(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) clean: rm -f nasuh-server *.o # end of Makefile