summaryrefslogtreecommitdiff
path: root/Makefile.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.cfg')
-rw-r--r--Makefile.cfg38
1 files changed, 38 insertions, 0 deletions
diff --git a/Makefile.cfg b/Makefile.cfg
new file mode 100644
index 0000000..0b5a803
--- /dev/null
+++ b/Makefile.cfg
@@ -0,0 +1,38 @@
+vpath %.c $(SPATH)
+vpath %.cc $(SPATH)
+vpath %.cpp $(SPATH)
+
+AR = ar rcs
+CC = gcc
+CXX = g++
+RM = rm -f
+LD = g++
+
+HAVES += -DHAVE_VSSCANF -DHAVE_FCNTL -DHAVE_UNISTD_H -DHAVE_FORK -DHAVE_PIPE -DHAVE_FSYNC -DHAVE_MALLOC_H -DHAVE_ASPRINTF -DHAVE_BYTESWAP_H
+
+DEBUG_FLAGS = -g -D_DEBUG
+RELEASE_FLAGS = -O3 -fno-strict-aliasing -DNDEBUG
+
+CPPFLAGS += -Wall -I../externals/Base/include -I../Utils
+CPPFLAGS += -DWORDS_LITTLEENDIAN
+CPPFLAGS += $(HAVES)
+CPPFLAGS += $(DEBUG_FLAGS)
+
+OBJS = $(addsuffix .o, $(notdir $(basename $(SRCS))))
+DEPS = $(addsuffix .dep, $(notdir $(basename $(SRCS))))
+
+all: dep $(TARGET)
+
+dep: $(DEPS)
+
+clean:
+ $(RM) $(OBJS) $(DEPS) $(TARGET)
+
+%.dep : %.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -M -MF $@ $<
+
+%.dep : %.cc
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -M -MF $@ $<
+
+%.dep : %.cpp
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -M -MF $@ $<