Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2010-10-11 16:32:25 -0400
committereutarass2010-10-11 16:32:25 -0400
commit6b75d281acad052564f5474ba47dd2e6ae0fa3eb (patch)
treeba41f2c472ed20921079e278ea9276978b60e780
parent202d24c5c20f9ff50b5c01213451398238ad5f57 (diff)
downloadorg.eclipse.tcf.agent-6b75d281acad052564f5474ba47dd2e6ae0fa3eb.tar.gz
org.eclipse.tcf.agent-6b75d281acad052564f5474ba47dd2e6ae0fa3eb.tar.xz
org.eclipse.tcf.agent-6b75d281acad052564f5474ba47dd2e6ae0fa3eb.zip
TCF Agent: fixed few build errors that happen when the code is built with OPSYS=MinGW
-rw-r--r--Makefile17
-rw-r--r--Makefile.inc5
-rw-r--r--server/Makefile6
-rw-r--r--system/MinGW/regset.h22
4 files changed, 39 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 4a99e94d..00a5df45 100644
--- a/Makefile
+++ b/Makefile
@@ -38,15 +38,13 @@ $(BINDIR)/tcflog$(EXTEXE): $(BINDIR)/main/main_log$(EXTOBJ) $(BINDIR)/libtcf$(EX
$(CC) $(CFLAGS) -o $@ $(BINDIR)/main/main_log$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB) $(LIBS)
$(BINDIR)/%$(EXTOBJ): %.c $(HFILES) Makefile Makefile.inc
-ifeq ($(OPSYS),MinGW)
- if not exist $(subst /,\,$(dir $@)) mkdir $(subst /,\,$(dir $@))
-else
- mkdir -p $(dir $@)
-endif
+ @$(call MKDIR,$(dir $@))
$(CC) $(CFLAGS) -c -o $@ $<
-clean:
- rm -rf $(BINDIR) RPM *.tar *.tar.bz2 *.rpm
+clean::
+ $(call RMDIR,$(BINDIR))
+
+ifeq ($(OPSYS),GNU/Linux)
install: all
install -d -m 755 $(INSTALLROOT)$(SBIN)
@@ -74,7 +72,6 @@ tcf-agent-$(VERSION).tar.bz2: $(HFILES) $(CFILES) Makefile Makefile.inc main/tcf
tar: tcf-agent-$(VERSION).tar.bz2
-ifeq ($(OPSYS),GNU/Linux)
rpm: all tar
rm -rf RPM
mkdir RPM RPM/BUILD RPM/RPMS RPM/RPMS/`uname -i` RPM/RPMS/noarch RPM/SOURCES RPM/SPECS RPM/SRPMS RPM/tmp
@@ -84,4 +81,8 @@ rpm: all tar
mv RPM/RPMS/`uname -i`/*.rpm .
mv RPM/SRPMS/*.rpm .
rm -rf RPM ~/.rpmmacros
+
+clean::
+ rm -rf RPM *.tar *.tar.bz2 *.rpm
+
endif
diff --git a/Makefile.inc b/Makefile.inc
index 25309c54..63c9b68e 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -11,6 +11,9 @@ INCDIRS = . system/$(OPSYS) machine/$(MACHINE)
SRCDIRS = $(INCDIRS) system framework services main
BINDIR = obj/$(OPSYS)/$(MACHINE)/$(CONF)
+MKDIR = mkdir -p $(1)
+RMDIR = rm -rf $(1)
+
ifeq ($(CONF),Debug)
OPTS += -g
else
@@ -39,6 +42,8 @@ ifeq ($(OPSYS),MinGW)
EXTOBJ = .obj
EXTEXE = .exe
LIBS = -lws2_32 -liphlpapi
+ MKDIR = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1))
+ RMDIR = if exist $(subst /,\,$(1)) rmdir /s /q $(subst /,\,$(1))
endif
ifeq ($(OPSYS),Darwin)
diff --git a/server/Makefile b/server/Makefile
index 5c5eccb3..aaf59c8f 100644
--- a/server/Makefile
+++ b/server/Makefile
@@ -19,12 +19,12 @@ $(BINDIR)/server$(EXTEXE): $(BINDIR)/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB
$(CC) $(CFLAGS) -o $@ $(BINDIR)/main/main$(EXTOBJ) $(BINDIR)/libtcf$(EXTLIB) $(LIBS)
$(BINDIR)/%$(EXTOBJ): %.c $(HFILES) Makefile
- @mkdir -p $(dir $@)
+ @$(call MKDIR,$(dir $@))
$(CC) $(CFLAGS) -c -o $@ $<
$(BINDIR)/%$(EXTOBJ): $(TCF_AGENT_DIR)/%.c $(HFILES) Makefile
- @mkdir -p $(dir $@)
+ @$(call MKDIR,$(dir $@))
$(CC) $(CFLAGS) -c -o $@ $<
clean:
- rm -rf $(BINDIR)
+ $(call RMDIR,$(BINDIR))
diff --git a/system/MinGW/regset.h b/system/MinGW/regset.h
new file mode 100644
index 00000000..07d0f831
--- /dev/null
+++ b/system/MinGW/regset.h
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and Eclipse Distribution License v1.0 which accompany this distribution.
+ * The Eclipse Public License is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+
+/*
+ * This header file provides definition of REG_SET - a structure that can
+ * hold values of target CPU registers.
+ */
+
+#if defined(WIN32)
+ typedef CONTEXT REG_SET;
+#endif

Back to the top