Index: uspace/app/pcc/cc/ccom/Makefile
===================================================================
--- uspace/app/pcc/cc/ccom/Makefile	(revision 597466186f14d9d212428c08a263da0d9fa06d3c)
+++ uspace/app/pcc/cc/ccom/Makefile	(revision c936c7f9ded988d13c3729f1394182797ffa8d7e)
@@ -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 $^ $@
+
