Index: uspace/app/pcc/cc/cc/Makefile
===================================================================
--- uspace/app/pcc/cc/cc/Makefile	(revision e6910c8cba8ef767d08e484d4d27dc60eb1d67ef)
+++ uspace/app/pcc/cc/cc/Makefile	(revision 80e9e5edd009650fe1b6323206b0bb22db7900cc)
@@ -35,12 +35,16 @@
 BINARY = cc
 
+PRE_DEPEND = compat.c
+EXTRA_CLEAN = compat.c
+
 POSIX_COMPAT = y
-
-
 
 SOURCES = \
 	cc.c \
-	$(MIPDIR)/compat.c
+	compat.c
 
 include $(USPACE_PREFIX)/Makefile.common
 
+compat.c: $(MIPDIR)/compat.c
+	ln -s -f $^ $@
+
Index: uspace/app/pcc/cc/ccom/Makefile
===================================================================
--- uspace/app/pcc/cc/ccom/Makefile	(revision e6910c8cba8ef767d08e484d4d27dc60eb1d67ef)
+++ uspace/app/pcc/cc/ccom/Makefile	(revision 80e9e5edd009650fe1b6323206b0bb22db7900cc)
@@ -34,5 +34,8 @@
 DEFS = -Dmach_$(PLATFORM) -D__helenos__ -DPCC_DEBUG -DGCC_COMPAT -Dfree=free
 BINARY = ccom
-EXTRA_CLEAN = cgram.c cgram.h scan.c external.c external.h
+
+PRE_DEPEND = cgram.c scan.c external.c external.h common.c compat.c
+EXTRA_CLEAN = cgram.c cgram.h scan.c external.c external.h common.c compat.c \
+	$(MIPDIR)/*.o $(MDIR)/*.o
 
 POSIX_COMPAT = y
@@ -51,6 +54,6 @@
 	$(MIPDIR)/optim2.c \
 	$(MIPDIR)/regs.c \
-	$(MIPDIR)/common.c \
-	$(MIPDIR)/compat.c \
+	common.c \
+	compat.c \
 	cgram.c \
 	scan.c \
@@ -67,4 +70,6 @@
 	trees.c
 
+include $(USPACE_PREFIX)/Makefile.common
+
 cgram.c: cgram.y
 	$(YACC) $(YFLAGS) -d $<
@@ -76,8 +81,14 @@
 	mv lex.yy.c scan.c
 
-external.c external.h:
-	ln -s arch/$(PLATFORM)/external.c external.c
-	ln -s arch/$(PLATFORM)/external.h external.h
+compat.c: $(MIPDIR)/compat.c
+	ln -s -f $^ $@
 
-include $(USPACE_PREFIX)/Makefile.common
+common.c: $(MIPDIR)/common.c
+	ln -s -f $^ $@
 
+external.c: arch/$(PLATFORM)/external.c
+	ln -s -f $^ $@
+
+external.h: arch/$(PLATFORM)/external.h
+	ln -s -f $^ $@
+
Index: uspace/app/pcc/cc/ccom/mkext/Makefile
===================================================================
--- uspace/app/pcc/cc/ccom/mkext/Makefile	(revision e6910c8cba8ef767d08e484d4d27dc60eb1d67ef)
+++ uspace/app/pcc/cc/ccom/mkext/Makefile	(revision 80e9e5edd009650fe1b6323206b0bb22db7900cc)
@@ -37,11 +37,23 @@
 POSIX_COMPAT = y
 
+PRE_DEPEND = mkext.c table.c common.c
+EXTRA_CLEAN = mkext.c table.c common.c
+
 # FIXME: external.{c,h} must be generated for each target system
 
 SOURCES = \
-	${MIPDIR}/mkext.c \
-	$(MDIR)/table.c \
-	${MIPDIR}/common.c
+	mkext.c \
+	table.c \
+	common.c
 
 include $(USPACE_PREFIX)/Makefile.common
 
+mkext.c: $(MIPDIR)/mkext.c
+	ln -s -f $^ $@
+
+table.c: $(MDIR)/table.c
+	ln -s -f $^ $@
+
+common.c: $(MIPDIR)/common.c
+	ln -s -f $^ $@
+
Index: uspace/app/pcc/cc/cpp/Makefile
===================================================================
--- uspace/app/pcc/cc/cpp/Makefile	(revision e6910c8cba8ef767d08e484d4d27dc60eb1d67ef)
+++ uspace/app/pcc/cc/cpp/Makefile	(revision 80e9e5edd009650fe1b6323206b0bb22db7900cc)
@@ -31,7 +31,9 @@
 ARCHDIR = ../../arch/$(PLATFORM)
 EXTRA_CFLAGS = -I$(MIPDIR) -I$(ARCHDIR) -w
-EXTRA_CLEAN = y.tab.c y.tab.h
 DEFS = -DCPP_DEBUG -Dfree=free -DCPPBUF=16384
 BINARY = cpp
+
+PRE_DEPEND = compat.c
+EXTRA_CLEAN = compat.c y.tab.c y.tab.h
 
 POSIX_COMPAT = y
@@ -43,9 +45,12 @@
 	cpp.c \
 	token.c \
-	$(MIPDIR)/compat.c
+	compat.c
+
+include $(USPACE_PREFIX)/Makefile.common
 
 y.tab.c:
 	$(YACC) -d cpy.y
 
-include $(USPACE_PREFIX)/Makefile.common
+compat.c: $(MIPDIR)/compat.c
+	ln -s -f $^ $@
 
